You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by garfield168 <ga...@gmx.de> on 2007/07/31 12:08:59 UTC
Add request to a HttpRequestSampler using Beanshell
Hello,
how can I dynamically add a HttpRequest to a existing HttpRequestSampler
using beanshell?
I don't know the syntax to reference a HttpRequestSampler.
Like:
Sampler.Add("HttpRequestSamplername","Name","Value");
thanks in advance
--
View this message in context: http://www.nabble.com/Add-request-to-a-HttpRequestSampler-using-Beanshell-tf4192071.html#a11921434
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Add request to a HttpRequestSampler using Beanshell
Posted by garfield168 <ga...@gmx.de>.
I'll answer my own question:
sampler = ctx.getCurrentSampler();
sampler.addArgument("hello","you");
args = sampler.getArguments();
print(args);
--
View this message in context: http://www.nabble.com/Add-request-to-a-HttpRequestSampler-using-Beanshell-tf4192071.html#a11944851
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org