问题
I want to run login request with different number of users: 10, 20, 30 and generate report with number of users, and response time.
I created CSV file with number of threads: 10, 20, 30
I assigned thread number variable into Number of Thread in Thread group but it does not run.
回答1:
You need to use property, call JMeter batch with different property value, with 10 threads for example
jmeter -JthreadNum=10 -t myJmx.jmx
And in your Test Plan get the property in your Number of Threads:
${__P(threadNum)}
Notice that the default of the function is 1 so it'll work (with 1 thread) even if you didn't sent any value.
Other solution to add property file with threadNum=10
line with calling command line options to either override or add JMeter property file:
-p, --propfile <argument> the jmeter property file to use -q, --addprop <argument> additional JMeter property file(s)
In your case, add to command line -q myprop.properties
来源:https://stackoverflow.com/questions/47343458/how-to-run-with-various-number-of-user-at-different-times-in-jmeter