Refer to:http://www.metaltoad.com/blog/jmeter-test-plan-drupal
Last week, I wrote about graphing JMeter results with Matplotlib. Let's take a closer look at the actual Drupal test plan.
This plan was adapted from Jacob Singh's test and has five different thread groups:
- Anonymous browsing
- Authenticated browsing
- Editing a node
- Search
- Login and view user page
Download the test plan: DrupalStress.jmx
Since some of these samplers need a variety of URLs to test, we have two input files:
urls:
Not surprisingly, this contains a list of URLs for the browsing threads. A simple list can be generated with the following query:
SELECT CONCAT('/node/', nid) FROM node WHERE STATUS = 1
ORDER BY changed LIMIT 1000;
For an active site, an alternative might be to extract this list from your site's access logs; such a list would closely match actual traffic patterns.
wordlist:
The wordlist contains a list of queries for the search thread. Querying the search_index table provides a basic list:
SELECT word FROM search_index ORDER BY RAND() LIMIT 1000;
This list will only contain one-word queries, so again you may want to tailor the wordlist to your site.
Running the test
To generate multiple samples with different parameters, it's best to run JMeter from a script. In this way configuration options can be parameterized (using the__P()
function) and passed to JMeter with the -J
option. The plotting script in particular expects multiple test runs with a variable number of threads. For this test, the thread_count variable is applied only to anonymous browsing, as it was testing a site that serves primarily anonymous visitors. This balance can be adjusted by editing the thread groups in JMeter.
#!/bin/bash
# The host under test.
HOST=localhost
# A Drupal username.
USER=user
# USER's password
PASS='12345'
# A node id to edit.
EDIT_ID=42
# Ramp up by factors of sqrt(2).
for thread_count in 2 3 4 6 8 11 16 23 32 45 64 91 128 181 256 362 512
do
jmeter.sh -n -t DrupalStress.jmx -Jhost=$HOST -Juser=$USER\
-Jpassword=$PASS -Jthreads=$thread_count -Jedit_id=$EDIT_ID
done
Each thread group uses a Runtime Controller set to 30 seconds, so this script will take about 10 minutes total. When it's finished, the CSV output will be in/tmp/Drupal6
.
相关推荐
测试LDAP 认证的一个jmeter testing plan sample, sample中采用basic authentication, 对某些网关产品弹出的页面输入用户名和密码,测试认证的performance
配合ant使用,可以让jmeter飞起来,文件中对生成的文件进行了备份归档整理,同时调用两个测试报告模版,让功能更加强大
jmeter_performance_test用于jmeter操作。Apache JMeter是一款纯java编写负载功能测试和性能测试开源工具软件。相比Loadrunner而言,JMeter小巧轻便且免费,逐渐成为了主流的性能测试工具,是每个测试人员都必须要...
1 建立测试计划(Test Plan) 测试计划描述了执行测试过程中JMeter的执行过程和步骤,一个完整的测试计划包括一个或者多个线程组(Thread Groups)、逻辑控制(Logic Controller)、实例产生控制器(Sample Generating...
--site-name="Drupal JMeter Test" standard drush user-create user --password="user" 跑步 > rake -T rake analyze # Perform log analysis on JMeter results rake clean # Remove current l
jmeter测试总结 JMeter 是一个功能强大且功能丰富的压力测试工具,由 Apache 组织开发的开放源代码项目。它可以用于测试静态或者动态资源的性能,包括文件、Servlets、Perl 脚本、Java 对象、数据库和查询、ftp ...
When your JMeter test plan tree becomes like a sequoia or a banyan, you start feeling yourself like a monkey in a jungle, jumping from branch to branch, trying to support this important test ...
### 如何为JMeter编写插件 #### 引言 JMeter是一款强大的开源负载测试工具,主要用于测试Web应用。为了增强其功能并满足特定需求,用户可以开发自定义插件来扩展其能力。本文将根据提供的部分内容,详细介绍如何为...
### 关于JMeter的知识点详解 #### 一、概述 JMeter是一款100%纯Java桌面应用程序,专为测试CS架构(客户端/服务器)的软件而设计。它不仅可以用于测试静态和动态资源(如静态文件、Java Servlets、CGI脚本、Java...
**JMeter 示例**: 介绍JMeter的测试配置,如线程组设置、采样器定义、监听器选择,以及如何解读JMeter的测试结果。 在撰写性能测试计划时,务必确保测试覆盖所有关键业务流程,同时考虑到异常处理和压力测试。计划...
JMeter中文手册JMeter中文手册JMeter中文手册JMeter中文手册JMeter中文手册JMeter中文手册JMeter中文手册JMeter中文手册JMeter中文手册JMeter中文手册JMeter中文手册JMeter中文手册JMeter中文手册JMeter中文手册...
Prepare a Test Plan 1.Create a Thread Group in Test Group. 2.Add HTTP Cookie Manager in Thread Group 3.Add HTTP Request Defaults in Thread Group. 4.Add Transaction Controller in Thread Group. 5.Edit ...
,only for Test creation and Test debugging.For load testing,use CLI Mode(was NON GUI):大致意思是:不要使用 GUI 模式进行负载测试!,仅用于测试创建和测试调试。对于负载测试请使用 CLI 模式(非 GUI)。 ...
2. **创建测试计划**:在工作台中,右键点击“Test Plan”添加新的测试计划,配置线程组、采样器、监听器等组件。 3. **配置HTTP请求**:在线程组中添加HTTP请求默认值或者HTTP请求采样器,设置URL、方法、参数等,...
**JMeter测试片段(Test Fragment)使用详解** Apache JMeter是一款功能强大的性能测试工具,用于模拟多种并发用户执行各种操作,以评估应用的性能和稳定性。在JMeter中,Test Fragment是一个特殊类型的元素,它...
### JMeter常见问题解决 #### 一、简介 在进行性能测试或压力测试时,Apache JMeter 是一款广泛使用的开源工具。它可以帮助测试人员轻松地模拟各种负载场景,并且能够支持多种协议和技术栈。然而,在实际操作过程...
"my test, just a simple test.use for myself"表明这是一个针对个人需求的简单测试,可能是为了理解应用程序在特定条件下的性能表现。 **JMeter的基本操作流程:** 1. **安装与启动**:下载JMeter的可执行jar文件...
总的来说,"Test Plan_2022-10-28.zip"可能包含了一个针对特定日期的软件测试计划,其中的"线程组.jmx"文件是使用JMeter设计的性能测试场景,用于评估系统的负载承受能力。通过分析JMX文件的配置和执行结果,可以...
* 逻辑控制器(Logic Controller):包括两类无件,一类是用于控制test plan中的sampler节点发送请求的逻辑顺序的控制器,另一类是用来组织可控制sampler来节点的 * 配置元件(Config Element):用于提供对静态数据...