On 08/04/2010, George Pitich <[email protected]> wrote: > Hi, > > I would like to know whether it is possible to change # of threads in a > thread group during runtime? For example, I'd like to start test cases with > 10 threads running for 1 min and than add (without stopping jmeter) another > 10 threads (now 20 threads are running) and finally after 2 mins, I'd like to > add another 20 threads and run the test case (now with 40 threads) for the > next 3 mins (the idea is to add the load progressively). If scripting is > required i can use groovy as I managed to run it with BSF sampler. >
You can use a long ramp-up time to start the threads gradually, but they won't start in sets of 10. If you need that functionality, then one way to do it would be to have a once-only Controller at the start of the thread. Add a Test Action Sampler as its child with a wait that depends on the thread number, such that threads 1-10 wait 0 seconds, 2-20 wait 60 seconds etc. The wait would be something like: ((int)threadNum / 10) * 60000 You can do this using standard JMeter functions, see: http://jakarta.apache.org/jmeter/usermanual/functions.html Or you could use a BSF Sampler that paused for the requisite time, and did not return a value (to avoid generating a sample). Or use a BSF Timer as a child of the Test Action Sampler (Timers only work if there is a sampler to act on). TMTOWTDI as the Perl community has it. > Many Thanks, > > g. > > > > > __________________________________________________________________ > Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your > favourite sites. Download it now > http://ca.toolbar.yahoo.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

