sebb wrote:
> Not easily.
> 
> You could try using the If Controller
> 
>  
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#If_Controller
>  with the condition
> 
> ${JMeterThread.last_sample_ok}" == "true" (check if last sample succeeded)
> 
> e.g.
> 
> A1
> If OK
> + A2
> If OK
> + A3
> If not OK
> + handle error
> 
> but this quickly becomes a bit tedious to code if there are lots of samplers.

True...

> If you can use a single sampler with variables read from a file, then
> you might be able to use a looping controller (or While Controller)
> instead. This would be harder to set up, but easier to extend once it
> was working. This only works if the samplers all need the same number
> of parameters, though you could get clever and use a Switch Controller
> to select between samplers with different numbers of parameters...

This is looking like way forward. It has given me an unexpeceted concern
though:
In one place in my code I have a single sampler with this code in a
BeanShell pre-processor to vary the parameter names and numbers:

while (en.hasMoreElements()) {
        user = en.nextElement();
        reason = chosen.get(user);
        sampler.addArgument("response_type", reason);
        sampler.addArgument("issued_users", user);
        sampler.addArgument("resptype_" + user, reason);
        sampler.addArgument("comment_" + user, "");
        sampler.addArgument("group_id_" + user, "0");
        sampler.addArgument("due_date_" + user, "");
}

Am I to infer from your comment that this is unwise?

        # r

-- 
Ronan Klyne
Business Collaborator Developer
Tel: +44 (0)870 163 2555
[EMAIL PROTECTED]
www.groupbc.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to