Jmeter测试WordPress用例

Jmeter测试WordPress用例

Env: Windows 7, server

Soft

  1. Prepare your test machine
    • Disable IE Enhanced Security Configuration on Server Manager > Local Server
    • Turn off firewall
    • Change time zone on your test machines to your local
  2. Install JRE
    • Download JRE from www.java.com and install. // Recommend that you install the same version on all of your machines
  3. Install and configure JMeter
  4. Download and configure 3rd party plugins
  5. Download ServerAgent-2.2.1.zip from https://github.com/Song2017/Resource/blob/master/Work/JMeter/ServerAgent-2.2.1.zip?raw=true
    • Extract to a folder, and then run startAgent.bat for Windows machines
  6. Run C:\apache-jmeter-2.13\bin\jmeter.bat, you’ll see the JMeter window

Wordpress

  1. configure Wordpress on jmeter
  2. set wordpress web server
    *Setting=> Permalinks => Common Settings => Plain

Run

  1. Init wordpress posts
    • Open the attached jmeter script C:\jmeter.wordpress\wordpress.init.jmx, and run
    • Please observe and understand all the variable defined in Section User Defined Variables which specified variables like webserver, service port, protocols and other essential variables which need to be modified according to the situation of each test case.
    • Please note these variables in section User Defined Variables:
      • static_posts_title_filename: assigned the file which contain post titles to initialize posts.
      • static_posts_content_filename: assigned the file which contains post content to initialize posts.
      • Please note the property Loop Count in section Login and Publish Thread Group, this value indicate the posts count will be initialized to WordPress site
  2. Run Jmter to test WordPress web Performance
    • Open the attached jmeter script C:\jmeter.wordpress\wordpress.1%write.jmx, and run
    • Please observe and understand all the variable defined in Section User Defined Variables which specified variables like webserver, service port, protocols and other essential variables which need to be modified according to the situation of each test case.
    • Please note these variables in section User Defined Variables:
      • blog_posts_filename: assigned the file contains the posts url which will be read in the test case (you need to change the content in this file or assigned to another file according the the actual urls of the posts in the wordpress site or the database type, or you will get a great amount of 404 error in the test results ).
      • commenting_posts_filename: assigned the file contains the posts url which will be commented in the test case (you need to change the content in this file or assigned to another file according the the actual urls of the posts in the wordpress site or the database type, or you will get a great amount of 404 error in the test results ).
      • search_queries_filename: assigned the file contains the posts titles which will be searched in the test case .
      • threads: the user loads will be ran in this test machine, if the user loads larger than 50 you need use two test machines and each machine make a half user loads, for example, you will set threads to 37 and 38 in two test machines for the test case of 75 user loads.
    • Please note the properties start time and end time in Scheduler Configuration in section View Posts and Post Comments Thread Group , set them to an specified time will helpful for data collection.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值