Basically your ref name is variable  (Im assuming your xpath only returns 1
value)
e.g. a_${c}

The counter function should have worked (to get c), but doesnt seem to ,
possibly it is a bug.

As a workaround To get an autoincrement counter in BeanShell post processor
use something like

String c = vars.get("c");
if(c == null){
  c="1";
} else {
  c= String.valueOf(Integer.parseInt(c) + 1);
}
vars.put("c",c);

This pre processor should apply to whichever samplers u want. if you can
group your samplers under say a simple controller, then simply create the
pre processor as a child of the simple controller , else you have to copy
this as a child of every sampler you want this logic for.
Possibly there might be simpler ways

regards
deepak

On Thu, Sep 29, 2011 at 8:04 PM, freesky <h...@windowslive.com> wrote:

> I want to use 'a_1', 'a_2' etc to represent 'createA', I can't use 'a',
> 'b',
> 'c' to represent 'createA'.
>
> Do you mean I should write like next in the XPath Extractor :
>
> Reference name : ${_counter(,rd)}
> XPath : //create/@id
>
> I tried it, it doesn't work.
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/How-can-I-assign-multiple-values-to-a-variable-tp4852668p4855569.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
>
>

Reply via email to