Thanks Sebb. I ended up using a BeanShell to calculate how many total threads would run, like this:
int numThreads = ctx.getThreadGroup().getNumberOfThreads(); Controller ctrl = ctx.getThreadGroup().getSamplerController(); LoopController loopCtrl = (LoopController)ctrl; int numLoops= loopCtrl.getLoops(); int totalThreads = numLoops * numThreads; I also have a simple counter, and if the counter >= totalThreads it stops the test: SampleResult.setStopTest(true); Too bad it doesn't work when TG2 is set to loop "Forever". In that case TG2 automatically stops when the csv data hits eof, but TG1 keeps going since my code above doesn't know when TG2 will stop. -- View this message in context: http://jmeter.512774.n5.nabble.com/Stop-Test-when-Thread-Group-2-Stops-tp5720738p5720841.html Sent from the JMeter - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
