Hello.

I have been experimenting with some of the JMeter 1.7.3 improvements over JMeter 1.7. 
Nice!

I am having trouble properly using the __counter function. My understanding from the 
manual is not improving with re-reading.

I am not using the 'Name of function', the second argument to __counter, properly.

What exactly is the second argument to __counter?

Say I have ${__counter(FALSE,mycount)} used somewhere in the object tree beneath a 
Thread Group.

My understanding of the second argument is this:

Use it to to expand the counter value 'again', without incrementing the counter value, 
by putting ${mycount} elsewhere in the Test Plan, under the same Thread Group.

Bearing in mind this test plan is tinkering, not a serious test:

Test Plan (variable: testhost, value: my hostname)
  Thread Group (threads: 3, ramp up: 0, count: 1)
    User Parameters (username, password [defined for 3 users])
    HTTP Request Defaults (server name: ${testhost})
    Simple Controller
      HTTP Request (path: /my/login/url,
                    param: username, value: ${username}
                    param: password, value: ${password}
                    param: counterTest, value: ${__counter(FALSE,mycount)} )
      HTTP Request (path: /some/other/url,
                    param: testTheCounter, value: ${mycount} )

counterTest in the first HTTP request has the expected values (1, 2, 3) for the 
requests generated by the 3 threads in the group. The global counter for the Thread 
Group is incremented on each reference to ${__counter(args)}.

testTheCounter in the second HTTP request is just ${mycount}.

Thanks for any pointers,
John Kavadias    [EMAIL PROTECTED]



Reply via email to