JMeter - Why once only controller runs more than once

前端 未结 6 1187
情深已故
情深已故 2021-02-04 09:08

I added two request one for login to store the session id and another request to check the load test which requires session id.

I made login request as once only, by ad

6条回答
  •  無奈伤痛
    2021-02-04 09:39

    You can put the "Login HTTP request" in the Once Only controller and the normal "HTTP request" in a Loop controller. Now you can set the loop to execute the HTTP request 100 or 200 times. See: jmeter.apache.org/usermanual/component_reference.html#Loop_Controller

    Use Timers to make a more realistic test. Say you want the 200 requests to happen in 120 seconds then you can make each request pause for 120/200 seconds. Most timers work with miliseconds so you can make that number (120/200 * 1000) miliseconds. See: jmeter.apache.org/usermanual/component_reference.html#timers

    You could also create a separate Setup threadgroup where you do your login and do the 200 threads in an another threadgroup. Check this article: http://www.informit.com/guides/content.aspx?g=java&seqNum=520

    All this information should help you in the right direction. Good luck!

提交回复
热议问题