Purpose of Throughput Controller?

喜你入骨 提交于 2019-11-29 07:33:53
  1. Throughput Controller will work correct if you have more than single iteration.
    I.e. you should have N loops (using Loop Controller e.g.) with child Throughput Controller set X percents (X is integer, 0 <= X <= 100) - so than X% from N loops is integer value too.
    You may look into this discussion for better examples and explanations.

  2. For your case you can try to use construction like the following:


Thread Group
Number of Threads = 2
Loop Count = 1
+- While Controller
   Condition = ${__javaScript("${login}"!="<EOF>",)}
   +- CSV Data Set Config
      Filename = users.csv
      Variable Names = login,pwd
      Delimiter = ,
   +- Loop Controller
      Loop Count = 10
      +- Login
      +- Throughput Controller
         Percent Execution
         Throughput = 50.0
         +- Clicking 1st button
      +- Throughput Controller
         Percent Execution
         Throughput = 50.0
         +- Clicking 2nd button
      +- Logout

where
- there are 2 threads (Thread Group: Number of Threads = 2) started simultaneously each with unique credentials extracted from csv-file (While Controller + CSV Data Set Config), used for Login;
- the whole test-flow - login > click button (either first or second) > logout - will be repeated N times using Loop Controller, which one makes Throughput Controller work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!