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
    • Download jmeter binaries (e.g. apache-jmeter-2.13.zip) from https://github.com/Song2017/Resource/blob/master/Work/JMeter/apache-jmeter-3.2-M.zip?raw=true
    • Extract jmeter to c:\
  4. Download and configure 3rd party plugins
    • Download JMeterPlugins-Standard-1.3.1.zip from http://jmeter-plugins.org/downloads/all/
    • Extract the plugins to %JMeter_HOME%/lib/ext
  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
    • Download jmeter configuration for wordpress from https://github.com/Song2017/Resource/blob/master/Work/JMeter/jmeter.wordpress.zip?raw=true
    • Extract Wordpress script to c:\
  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.

你可能感兴趣的:(Jmeter)