In 2.0.1 new Thread Group options were introduced that gave us more options on what to do when a thread encounters a Sample Error. Currently the options are to Continue, Stop Thread, or Stop Test. I think it would be very useful to have a Next Loop option available here as well. The reason for this is that say I'm running a load test, but only want to the initial point where errors are encountered, and error caused by a previous action that didn't work properly. The current options don't allow me to do this as 'Continue' results in a possibly large number of cascaded errors, 'Stop Thread' will slowly kill the load test and 'Stop Test' just isn't what I want to do. Having a Next Loop option on the Thread Group would allow me to run a test of a constant load of 50 users for a scheduled duration and observe where the initial errors are encountered.
I totally agree with this feature : I need it for some time now.
Created attachment 20834 [details] This adds the functionality to have a failed thread restart on the next iteration
Created attachment 20840 [details] Fixes Issue with recursive Controllers, Patch against 2.2 This fixes an Issue with clearing the state of recursive controllers.
Created attachment 22624 [details] Test case Just tried the patch (adapted for version 2.3.2) and unfortunately it does not work properly. The attached test plan: Thread Group 3 loops, on error next loop Sample BEFORE Sample BAD Sample AFTER should result in the following output: BEFORE BAD BEFORE BAD BEFORE BAD as it should always skip the AFTER sample. However, the samples are: BEFORE BAD AFTER BEFORE BAD When the thread group has 2 loops it generates BEFORE BAD AFTER
This would be a killer feature! Any change to get this included in jmeter?
Created attachment 25790 [details] allows threads to restart the loop when an error occurs, avoiding the samplers that appear after the error I made these changes to some of the JMeter classes to provide this functionality, because I needed it and I think it's important to have it. The only problem with my changes is that if the first sampler on the test tree is inside a logic controller the test will not behave properly, but in any opther cases it works great. Let me know what you think about it and if you find some ways to improve it. Thanks a lot.
Created attachment 25931 [details] plugin for this functionality This controller skips every sampler after one that fails, for example, if the test tree is like this: Sampler1(PASS) Sampler2(PASS) Sampler3(FAIL) Sampler4(PASS) Sampler5(PASS) then after Sampler3 is executed and fails, Sampler4 and Sampler5 won't be executed, intead the next sampler to test will be Sampler1 (or the test will finish if the number of iterations is completed). I've tested it a lot (even with other controllers inside it) and it works great. The txt file contains the code for the 2 classes that compose the plugin (SkipErrorsControllerGui.java and SkipErrorsController.java)
Created attachment 25945 [details] update for path from 2010-07-20 15:20 EDT It's the same patch as the one from 2010-07-20 15:20 EDT, but compared to version 2.4 of jmeter (last version)
Thanks for your new patch. It has correct format. I tested and all seems ok (jmx test case and no regression) I just ask me si "Restart thread" is a good label? Perhaps "Launch next iteration" or similar is a better label? If you are ok, I can change label and some variables before put in svn. (with update docs)
(In reply to comment #9) > Thanks for your new patch. It has correct format. > I tested and all seems ok (jmx test case and no regression) > > I just ask me si "Restart thread" is a good label? Perhaps "Launch next > iteration" or similar is a better label? > > If you are ok, I can change label and some variables before put in svn. (with > update docs) Sure thing Milamber, and yes "Launch next iteration" sounds more accurate than "Restart thread" since the thread is not really restarted. So go ahead and change the names you need, there is no problem. Thanks a lot.
Thanks for your patch. I changed label to "Start Next Loop" (same JMeter's vocabulary) on GUI and in source code I added some screenshots and did a small update for docs In a few days, you can get a JMeter Nightly Build after the revision 989973 URL: http://svn.apache.org/viewvc?rev=989973&view=rev Log: Bug 30563 - Thread Group should have a start next loop option on Sample Error Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/AbstractThreadGroupGui.java jakarta/jmeter/trunk/xdocs/changes.xml jakarta/jmeter/trunk/xdocs/images/screenshots/threadgroup.png jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/threadgroup.png jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/threadgroup2.png jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
Thanks a lot Milamber. I'm glad to have helped, please let me know if you find anything wrong with the patch. Take care. Franco (In reply to comment #11) > Thanks for your patch. > > I changed label to "Start Next Loop" (same JMeter's vocabulary) on GUI and in > source code > > I added some screenshots and did a small update for docs > > In a few days, you can get a JMeter Nightly Build after the revision 989973 > > > URL: http://svn.apache.org/viewvc?rev=989973&view=rev > Log: > Bug 30563 - Thread Group should have a start next loop option on Sample Error > > Modified: > > jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java > > jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties > > jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties > > jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java > jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java > > jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/AbstractThreadGroupGui.java > jakarta/jmeter/trunk/xdocs/changes.xml > jakarta/jmeter/trunk/xdocs/images/screenshots/threadgroup.png > jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/threadgroup.png > jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/threadgroup2.png > jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
New commit to fix some bug * TC as parent don't start next loop when an error apparear in subsampler * when a sampler is follow by a TC as parent (with error), this TC don't apparear in result. URL: http://svn.apache.org/viewvc?rev=1057782&view=rev Log: Since add Start Next Loop behavior ([Bug 30563] Thread Group should have a start next loop option on Sample Error), some new bugs on transaction controller with option Generate as parent enabled are come. Fix. Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
Created attachment 26477 [details] Test cases for validate this fix. When next nightly build will generate, please make some test, if you can.
Hi Milamber, I was wondering, what is the state in this? will it be in the next JMeter's release? Thanks. - Franco
Yes this will be in next release (no date). You can try with JMeter nightly build http://jakarta.apache.org/jmeter/nightly.html (In reply to comment #15) > Hi Milamber, > > I was wondering, what is the state in this? will it be in the next JMeter's > release? > > Thanks. > > > - Franco
Start next loop option on error is now in JMeter 2.5
*** Bug 45839 has been marked as a duplicate of this bug. ***
*** Bug 40961 has been marked as a duplicate of this bug. ***
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1422