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小巧轻便且免费,逐渐成为了主流的性能测试工具,是每个测试人员都必须要...
Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter Jmeter
--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
How to Write a plugin for JMeter
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工具里的junit,java,http方式进行性能测试
Using Apache JMeter to Test Web Services.pdf
性能工具 jmeter, webload, loadrunner 比较, 如何抒写性能测试计划
Jmeter常见问题,性能测试、压测、常见问题,速解答。快速上手使用jmeter 相关问题与命令
Apache JMeter: A practical beginner's guide to automated testing and performance measurement for your websites Book Description: Learn to load-test your website, test its functional behaviour, and ...
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 ...
图片验证码识别 UUID唯一ID动态生成样本 动态生成全国的身份证号样本 动态生成手机号样本 token使用MD5加密生成样本 跨越线程组参数化样例 数据库动态参数化 数据库物理清理测试数据 等等
Using JMeter to Performance Test Web Services.pdf
将 jpgc-graphs-basic-2.0.zip 解压缩后只有一个 lib 目录,该目录下有一个 ext 文件夹和一个 jmeter-plugins-cmn-jmeter-0.3.jar 包,ext 文件夹中有 jmeter-plugins-graphs-basic-2.0.jar 和 jmeter-plugins-...
Apache JMeter (apache-jmeter-5.4.3.zip)可用于测试静态和动态资源、Web 动态应用程序的性能。 它可用于模拟服务器、服务器组、网络或对象上的重负载,以测试其强度或分析不同负载类型下的整体性能。 Apache ...
JMeter-Test Fragment的使用博客的demo下载。下载后可以更深入的学习该博客,欢迎大家来学习一下
my test,just a simple test.use for myself