You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2006/09/13 00:13:10 UTC
DO NOT REPLY [Bug 40490] New: - jmeter enters while loop on every other iteration of foreach
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40490>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40490
Summary: jmeter enters while loop on every other iteration of
foreach
Product: JMeter
Version: 2.1.1
Platform: Other
OS/Version: other
Status: NEW
Severity: major
Priority: P1
Component: Main
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: jmeterlist@yahoo.com
I am having a problem with a while loop controller inside of a
foreach controller. It seems that jmeter enters the while loop every other
foreach iteration (i reset the loopflag to true before it get to the
while loop and to false once it gets inside of while)
> -set test variables of pattern "variablename_" + index (1-10)
> -Foreach( variablename_ )
> {
> *set while loopflag to "true"
> *while loop (loopflag)
> {
> print test message
> set loopflag to "false"
> }
> }
>
> The test message is being printed on every other iteration of the
foreach.
(requires beanshell to run)
<jmeterTestPlan version="1.1" properties="1.7">
<hashTree>
<TestPlan>
<elementProp name="TestPlan.user_defined_variables"
elementType="org.apache.jmeter.config.Arguments">
<stringProp
name="TestElement.gui_class">org.apache.jmeter.config.gui.ArgumentsPanel</strin
gProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.config.Arguments</stringProp>
<collectionProp name="Arguments.arguments"/>
<stringProp name="TestElement.name">User Defined
Variables</stringProp>
<boolProp name="TestElement.enabled">true</boolProp>
</elementProp>
<stringProp
name="TestElement.gui_class">org.apache.jmeter.control.gui.TestPlanGui</stringP
rop>
<stringProp name="TestPlan.user_define_classpath"></stringProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.testelement.TestPlan</stringPro
p>
<stringProp name="TestElement.name">Test Plan</stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestElement.enabled">true</boolProp>
<stringProp name="TestPlan.comments"></stringProp>
</TestPlan>
<hashTree>
<ThreadGroup>
<longProp
name="ThreadGroup.start_time">1118867792000</longProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.threads.ThreadGroup</stringProp
>
<stringProp name="ThreadGroup.delay"></stringProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<boolProp name="TestElement.enabled">true</boolProp>
<stringProp name="ThreadGroup.num_threads">1</stringProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp
name="TestElement.gui_class">org.apache.jmeter.threads.gui.ThreadGroupGui</stri
ngProp>
<elementProp name="ThreadGroup.main_controller"
elementType="org.apache.jmeter.control.LoopController">
<stringProp
name="TestElement.gui_class">org.apache.jmeter.control.gui.LoopControlPanel</st
ringProp>
<stringProp name="LoopController.loops">1</stringProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.control.LoopController</stringP
rop>
<stringProp name="TestElement.name">Loop
Controller</stringProp>
<boolProp name="TestElement.enabled">true</boolProp>
<boolProp
name="LoopController.continue_forever">false</boolProp>
</elementProp>
<stringProp name="TestElement.name">Thread Group</stringProp>
<longProp name="ThreadGroup.end_time">1118867792000</longProp>
<stringProp
name="ThreadGroup.on_sample_error">stoptest</stringProp>
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
</ThreadGroup>
<hashTree>
<BeanShellSampler>
<stringProp name="BeanShellSampler.filename"></stringProp>
<stringProp
name="TestElement.gui_class">org.apache.jmeter.protocol.java.control.gui.BeanSh
ellSamplerGui</stringProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.protocol.java.sampler.BeanShell
Sampler</stringProp>
<stringProp name="TestElement.name">set foreach
vars</stringProp>
<stringProp name="BeanShellSampler.query">int varIndex = 1;
for (int i = 1; i<=10; i++ )
{
vars.put("testVar_"+i, "testValue"+i );
}
</stringProp>
<boolProp name="TestElement.enabled">true</boolProp>
<stringProp name="BeanShellSampler.parameters"></stringProp>
</BeanShellSampler>
<hashTree/>
<org.apache.jmeter.control.ForeachController>
<stringProp
name="ForeachController.inputVal">testVar</stringProp>
<stringProp
name="TestElement.gui_class">org.apache.jmeter.control.gui.ForeachControlPanel<
/stringProp>
<stringProp
name="ForeachController.returnVal">currentVar</stringProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.control.ForeachController</stri
ngProp>
<stringProp name="TestElement.name">ForEach
Controller</stringProp>
<boolProp name="TestElement.enabled">true</boolProp>
<boolProp
name="ForeachController.useSeparator">true</boolProp>
</org.apache.jmeter.control.ForeachController>
<hashTree>
<BeanShellSampler>
<stringProp name="BeanShellSampler.filename"></stringProp>
<stringProp
name="TestElement.gui_class">org.apache.jmeter.protocol.java.control.gui.BeanSh
ellSamplerGui</stringProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.protocol.java.sampler.BeanShell
Sampler</stringProp>
<stringProp name="TestElement.name">print var under
test</stringProp>
<stringProp
name="BeanShellSampler.query">System.out.println( "testing testVar:
" + vars.get("currentVar") );
</stringProp>
<boolProp name="TestElement.enabled">true</boolProp>
<stringProp
name="BeanShellSampler.parameters"></stringProp>
</BeanShellSampler>
<hashTree/>
<BeanShellSampler>
<stringProp name="BeanShellSampler.filename"></stringProp>
<stringProp
name="TestElement.gui_class">org.apache.jmeter.protocol.java.control.gui.BeanSh
ellSamplerGui</stringProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.protocol.java.sampler.BeanShell
Sampler</stringProp>
<stringProp name="TestElement.name">set loop
variables</stringProp>
<stringProp
name="BeanShellSampler.query">vars.put("LoopFlag",
""+"true");
</stringProp>
<boolProp name="TestElement.enabled">true</boolProp>
<stringProp
name="BeanShellSampler.parameters"></stringProp>
</BeanShellSampler>
<hashTree/>
<BeanShellSampler>
<stringProp name="BeanShellSampler.filename"></stringProp>
<stringProp
name="TestElement.gui_class">org.apache.jmeter.protocol.java.control.gui.BeanSh
ellSamplerGui</stringProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.protocol.java.sampler.BeanShell
Sampler</stringProp>
<stringProp name="TestElement.name">debug print (loop
info)</stringProp>
<stringProp
name="BeanShellSampler.query">System.out.println("*****BEFORE ENTERING
WHILE");
System.out.println("LoopFlag = " +
vars.get("LoopFlag"));
</stringProp>
<boolProp name="TestElement.enabled">true</boolProp>
<stringProp
name="BeanShellSampler.parameters"></stringProp>
</BeanShellSampler>
<hashTree/>
<org.apache.jmeter.control.WhileController>
<stringProp
name="TestElement.gui_class">org.apache.jmeter.control.gui.WhileControllerGui</
stringProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.control.WhileController</string
Prop>
<stringProp name="TestElement.name">test while
loop</stringProp>
<boolProp name="TestElement.enabled">true</boolProp>
<stringProp
name="WhileController.condition">${LoopFlag}</stringProp>
</org.apache.jmeter.control.WhileController>
<hashTree>
<BeanShellSampler>
<stringProp
name="BeanShellSampler.filename"></stringProp>
<stringProp
name="TestElement.gui_class">org.apache.jmeter.protocol.java.control.gui.BeanSh
ellSamplerGui</stringProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.protocol.java.sampler.BeanShell
Sampler</stringProp>
<stringProp name="TestElement.name">Got into a
while</stringProp>
<stringProp
name="BeanShellSampler.query">System.out.println("+++++++++++++++++INSIDE
while++++++++++++++");
vars.put("LoopFlag", "false");
</stringProp>
<boolProp name="TestElement.enabled">true</boolProp>
<stringProp
name="BeanShellSampler.parameters"></stringProp>
</BeanShellSampler>
<hashTree/>
</hashTree>
<BeanShellSampler>
<stringProp name="BeanShellSampler.filename"></stringProp>
<stringProp
name="TestElement.gui_class">org.apache.jmeter.protocol.java.control.gui.BeanSh
ellSamplerGui</stringProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.protocol.java.sampler.BeanShell
Sampler</stringProp>
<stringProp name="TestElement.name">debug print (loop
info)</stringProp>
<stringProp
name="BeanShellSampler.query">System.out.println("******AFTER WHILE
LOOP");
System.out.println("LoopFlag = " +
vars.get("LoopFlag") +'\n');
</stringProp>
<boolProp name="TestElement.enabled">true</boolProp>
<stringProp
name="BeanShellSampler.parameters"></stringProp>
</BeanShellSampler>
<hashTree/>
</hashTree>
<ResultCollector>
<stringProp
name="TestElement.gui_class">org.apache.jmeter.visualizers.ViewResultsFullVisua
lizer</stringProp>
<stringProp
name="TestElement.test_class">org.apache.jmeter.reporters.ResultCollector</stri
ngProp>
<stringProp name="TestElement.name">View Results
Tree</stringProp>
<objProp>
<value
class="org.apache.jmeter.samplers.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>true</xml>
<fieldNames>false</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<delimiter>,</delimiter>
<printMilliseconds>true</printMilliseconds>
</value>
<name>saveConfig</name>
</objProp>
<boolProp name="TestElement.enabled">true</boolProp>
<stringProp name="filename"></stringProp>
<boolProp
name="ResultCollector.error_logging">false</boolProp>
</ResultCollector>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 40490] - jmeter enters while loop on every other iteration of foreach
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40490>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40490
sebb@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEEDINFO
------- Additional Comments From sebb@apache.org 2006-09-16 23:42 -------
I've put a fix into the code which is in the nightly build: 2-2.20060916 if you
want to give it a try.
Please let us know if it works - or not.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 40490] - jmeter enters while loop on every other iteration of foreach
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40490>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40490
jmeterlist@yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version|other |Windows XP
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 40490] - jmeter enters while loop on every other iteration of foreach
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40490>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40490
sebb@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |FIXED
------- Additional Comments From sebb@apache.org 2007-07-02 05:55 -------
Assuming fixed; please re-open with more details if not
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 40490] - jmeter enters while loop on every other iteration of foreach
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40490>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40490
sebb@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
------- Additional Comments From sebb@apache.org 2006-09-14 13:19 -------
I think I may have found the problem and a fix. I hope to update the code in
the next week.
[By the way, it's much easier to use JMX files etc if they are provided as
attachments, rather than inline. Next time, please create the issue, and you
can then add attachments.]
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 40490] - jmeter enters while loop on every other iteration of foreach
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40490>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40490
------- Additional Comments From sebb@apache.org 2007-07-02 05:54 -------
Created an attachment (id=20427)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=20427&action=view)
Fixed up version of test case without bad line breaks
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org