It is very frequent in scripting that in case of error or under certain conditions that we want to do the equivalent of "continue" in current loop, meaning switch to next iteration of current Loop. Currently JMeter allows only restarting the main thread loop which is too much for example in the case of a scenario like this: - 1 Login - X Executions of some treatment in a loop. In case of error or under certain conditions we just want to go to next iteration , the workaround today is to nest IfController. This enhancement will introduce the feature and make it available in : - Test Action - Result Status Handler
Author: pmouawad Date: Sat Mar 31 10:32:33 2018 New Revision: 1828095 URL: http://svn.apache.org/viewvc?rev=1828095&view=rev Log: Bug 62238 - Add ability to Switch to next iteration of Current Loop Contributed by Ubik Load Pack Bugzilla Id: 62238 Modified: jmeter/trunk/src/components/org/apache/jmeter/sampler/TestAction.java jmeter/trunk/src/components/org/apache/jmeter/sampler/gui/TestActionGui.java jmeter/trunk/src/core/org/apache/jmeter/gui/OnErrorPanel.java jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultAction.java jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java jmeter/trunk/src/core/org/apache/jmeter/testelement/OnErrorTestElement.java jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java jmeter/trunk/xdocs/changes.xml
Author: pmouawad Date: Sat Mar 31 12:27:47 2018 New Revision: 1828103 URL: http://svn.apache.org/viewvc?rev=1828103&view=rev Log: Bug 62238 - Add ability to Switch to next iteration of Current Loop Fix regression Bugzilla Id: 62238 Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
Created attachment 35831 [details] Test Action screenshot As part of this bug, Test Action UI has been reworked.
Created attachment 35832 [details] Result Status Action Handler Screenshot As part of this bug, Result Status Action Handler UI has been reworked.
As part of this commit but related to Bug 62239, code for breaking loop is in WORK IN PROGRESS.
Hello, We detected an issue when option is enabled. Reopening for now, will provide more details later. Thanks
Created attachment 35968 [details] Test Plan showing current bug in nightly On second iteration of Thread Group, the loop is not entered anymore.
(In reply to Philippe Mouawad from comment #7) > Created attachment 35968 [details] > Test Plan showing current bug in nightly > > On second iteration of Thread Group, the loop is not entered anymore. because the LC iteration has not been reset
Created attachment 36005 [details] Test plan to test Result Status Action Handler
Author: pmouawad Date: Wed Jul 4 12:04:56 2018 New Revision: 1835050 URL: http://svn.apache.org/viewvc?rev=1835050&view=rev Log: Bug 62238 - Add ability to Switch to next iteration of Current Loop Fix failure of test Bug 62239, add tests for 62238 Bugzilla Id: 62238 Added: jmeter/trunk/bin/testfiles/TestResultStatusAction.csv jmeter/trunk/bin/testfiles/TestResultStatusAction.jmx (with props) jmeter/trunk/bin/testfiles/TestResultStatusAction.xml (with props) Modified: jmeter/trunk/build.xml jmeter/trunk/src/core/org/apache/jmeter/control/WhileController.java Author: fschumacher Date: Wed Jul 4 18:46:28 2018 New Revision: 1835078 URL: http://svn.apache.org/viewvc?rev=1835078&view=rev Log: Don't store the size of the responses for the samplers in this test. It is fragile and breaks the integration tests. Bugzilla Id: 62238 Modified: jmeter/trunk/bin/testfiles/TestResultStatusAction.jmx jmeter/trunk/bin/testfiles/TestResultStatusAction.xml Author: pmouawad Date: Wed Jul 4 12:20:54 2018 New Revision: 1835052 URL: http://svn.apache.org/viewvc?rev=1835052&view=rev Log: Bug 62238 - Add ability to Switch to next iteration of Current Loop Enable disabled thread groups Bugzilla Id: 62238 Modified: jmeter/trunk/bin/testfiles/TestResultStatusAction.jmx Author: pmouawad Date: Tue Jul 3 20:16:38 2018 New Revision: 1835022 URL: http://svn.apache.org/viewvc?rev=1835022&view=rev Log: Bug 62238 - Add ability to Switch to next iteration of Current Loop Fix issue in nightly Bugzilla Id: 62238 Modified: jmeter/trunk/src/components/org/apache/jmeter/control/ForeachController.java jmeter/trunk/src/core/org/apache/jmeter/control/IteratingController.java jmeter/trunk/src/core/org/apache/jmeter/control/LoopController.java jmeter/trunk/src/core/org/apache/jmeter/control/WhileController.java
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4730