-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to Switch to next iteration of Current Loop #4730
Comments
@pmouawad (migrated from Bugzilla): URL: http://svn.apache.org/viewvc?rev=1828095&view=rev Modified: |
@pmouawad (migrated from Bugzilla): URL: http://svn.apache.org/viewvc?rev=1828103&view=rev Modified: |
@pmouawad (migrated from Bugzilla): Created attachment Test_Action.png: Test Action screenshot |
@pmouawad (migrated from Bugzilla): Created attachment Result_Status_Action_Handler.png: Result Status Action Handler Screenshot |
@pmouawad (migrated from Bugzilla): |
UbikLoadPack support (migrated from Bugzilla): Thanks |
@pmouawad (migrated from Bugzilla): Created attachment BUG_62238.jmx: Test Plan showing current bug in nightly BUG_62238.jmx<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="4.1" jmeter="4.1-SNAPSHOT.20180612">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">3</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">1</stringProp>
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</ThreadGroup>
<hashTree>
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="TC" enabled="true">
<boolProp name="TransactionController.includeTimers">false</boolProp>
<boolProp name="TransactionController.parent">false</boolProp>
</TransactionController>
<hashTree>
<DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="DS-${__jm__LC__idx}" enabled="true">
<boolProp name="displayJMeterProperties">false</boolProp>
<boolProp name="displayJMeterVariables">true</boolProp>
<boolProp name="displaySystemProperties">false</boolProp>
</DebugSampler>
<hashTree>
<JSR223PreProcessor guiclass="TestBeanGUI" testclass="JSR223PreProcessor" testname="JSR223 PreProcessor" enabled="true">
<stringProp name="scriptLanguage">groovy</stringProp>
<stringProp name="parameters"></stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="cacheKey">true</stringProp>
<stringProp name="script">vars.put("__jm__LC__idx", "1");</stringProp>
</JSR223PreProcessor>
<hashTree/>
</hashTree>
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="LC" enabled="true">
<boolProp name="LoopController.continue_forever">true</boolProp>
<stringProp name="LoopController.loops">4</stringProp>
</LoopController>
<hashTree>
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="sc2" enabled="true">
<boolProp name="TransactionController.includeTimers">false</boolProp>
<boolProp name="TransactionController.parent">false</boolProp>
</TransactionController>
<hashTree>
<DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="DS-${__jm__LC__idx}" enabled="true">
<boolProp name="displayJMeterProperties">false</boolProp>
<boolProp name="displayJMeterVariables">true</boolProp>
<boolProp name="displaySystemProperties">false</boolProp>
</DebugSampler>
<hashTree/>
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="JSS_FailsIfCptHigherThan1" enabled="true">
<stringProp name="cacheKey">true</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="parameters"></stringProp>
<stringProp name="script">int cpt = vars["__jm__LC__idx"].toInteger();
if(cpt > 1) {
SampleResult.setSuccessful(false);
} else {
SampleResult.setSuccessful(true);
}
</stringProp>
<stringProp name="scriptLanguage">groovy</stringProp>
</JSR223Sampler>
<hashTree/>
<DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="Debug Sampler" enabled="true">
<boolProp name="displayJMeterProperties">false</boolProp>
<boolProp name="displayJMeterVariables">true</boolProp>
<boolProp name="displaySystemProperties">false</boolProp>
</DebugSampler>
<hashTree/>
<ResultAction guiclass="ResultActionGui" testclass="ResultAction" testname="Result Status Action Handler" enabled="true">
<intProp name="OnError.action">5</intProp>
</ResultAction>
<hashTree/>
</hashTree>
</hashTree>
<DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="DS-${__jm__LC__idx}" enabled="true">
<boolProp name="displayJMeterProperties">false</boolProp>
<boolProp name="displayJMeterVariables">true</boolProp>
<boolProp name="displaySystemProperties">false</boolProp>
</DebugSampler>
<hashTree/>
</hashTree>
</hashTree>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
</hashTree>
</jmeterTestPlan> |
@pmouawad (migrated from Bugzilla):
because the LC iteration has not been reset |
@pmouawad (migrated from Bugzilla): |
@pmouawad (migrated from Bugzilla): URL: http://svn.apache.org/viewvc?rev=1835050&view=rev Fix failure of test #4731, add tests for 62238 Added: Author: fschumacher URL: http://svn.apache.org/viewvc?rev=1835078&view=rev It is fragile and breaks the integration tests. Modified: Author: pmouawad URL: http://svn.apache.org/viewvc?rev=1835052&view=rev Enable disabled thread groups Modified: Author: pmouawad URL: http://svn.apache.org/viewvc?rev=1835022&view=rev Fix issue in nightly Modified: |
@pmouawad (Bug 62238):
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:
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 :
OS: All
The text was updated successfully, but these errors were encountered: