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 2004/11/15 19:54:24 UTC

DO NOT REPLY [Bug 32252] New: - Counter isn't evaluated on first time through ForEachController

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=32252>.
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=32252

           Summary: Counter isn't evaluated on first time through
                    ForEachController
           Product: JMeter
           Version: 2.0.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Main
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: observewisdom@yahoo.com


If I add a counter to a forEach controller then the value set by the counter
isn't created until the second time through.  For example, I have a forEach
controller and under it I have a counter that sets the value of the "myCount"
variable. If I use the myCount variable in a sampler then ${myCount} evaluates
to ${myCount} in the output rather than, for example, the number 1.  If I add
the counter and the sampler into a loop controller under the forEach controller
then in the first loop ${myCount} evaluates to ${myCount} but on the next loop
${myCount} evaluates to 1. All other controllers work properly with the counter.
This setup should show the bug:

TestPlan (inputVar_1 is set to a value)
ThreadGroup 1 
   - ForEach Controller (input variable: inputVar)
      - Counter (start: 1, variable reference: forCount)
      - Http Sampler (uses ${forCount} somewhere)
ThreadGroup 2 
   - ForEach Controller (input variable: inputVar)
      - Loop Controller (loop count: 2)
         - Counter (start: 1, variable reference: loopCount)
         - Http Sampler (uses ${loopCount} somewhere)
ThreadGroup 3
   - (Not a ForEach) Controller
      - Counter (start: 1, variable reference: myCount)
      - Http Sampler (uses ${myCount} somewhere)

The results are as follows (where -> indicates evaluation of an expression):

ThreadGroup 1: ${forCount} -> ${forCount}
ThreadGroup 2, iteration 1: ${loopCount} -> ${loopCount}
ThreadGroup 2, iteration 2: ${loopCount} -> 1
ThreadGroup 3: ${myCount} -> 1

Of course, each run should should evaluate like ThreadGroup 3.

I am running on Windows XP SP2, using Java 1.4.2_05, and running Jmeter 2.0.1. I
also tested the most recent nightly build (Jmeter 2.0.2 RC1 build 11/8/04) and
it had the same behavior.  I can provide a testplan that shows this behavior, if
requested.

-- 
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