I want to set Duration for test working. In my Thread Group I set
- Number of Threads = 1
- Ramp-up period = 0
- checked 'Forever'
- checked 'Scheduler'
- Duration = 10
- Startup delay = 0
So if test needs more than 10 seconds to be finished, elapsed time is quit right - 10 second. BUT if it needs, for example, 5 seconds, it stops after 5 seconds, not after 10 as I expect.
How to make script to work until Duration time elapsed?
UPD. Screenshot of Thread Group settings
Logs for last running:
2017/04/11 19:53:33 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2017/04/11 19:53:33 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2017/04/11 19:53:33 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*)
2017/04/11 19:53:33 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2017/04/11 19:53:33 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2017/04/11 19:53:33 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2017/04/11 19:53:33 INFO - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 0 perThread 0.0 delayedStart=false
2017/04/11 19:53:33 INFO - jmeter.threads.ThreadGroup: Started thread group number 1
2017/04/11 19:53:33 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started
2017/04/11 19:53:33 INFO - jmeter.threads.JMeterThread: Thread started: Thread Group 1-1
2017/04/11 19:53:33 INFO - jmeter.services.FileServer: Stored: data.txt
2017/04/11 19:53:40 INFO - jmeter.threads.JMeterThread: Stop Thread seen for thread Thread Group 1-1, reason:org.apache.jorphan.util.JMeterStopThreadException: End of file:data.txt detected for CSV DataSet:CSV get parameter for request configured with stopThread:true, recycle:false
2017/04/11 19:53:40 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2017/04/11 19:53:40 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2017/04/11 19:53:40 INFO - jmeter.services.FileServer: Close: data.txt
2017/04/11 19:53:40 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)