jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Re: Problem passing parameter values from If-Controller
Date Sun, 09 Apr 2006 18:53:04 GMT
Why not:
* pass in the value of param_a as well as (or instead of) param_1
or
* use a JavaScript or BeanShell function to implement the conditional logic?

You could also have multiple parameter files and pass the appropriate
one to CSV Data set.

S.
On 09/04/06, Amela Abadzic <amelaa@verizon.net> wrote:
> Depending on the value of one parameter passed at runtime (param_1), I need to implement
logic to calculate a value of param_a, and pass it to the http request - so something like:
>
> If (param_1== "value_a") param_a=x;
> else if (param_1=="value_b") param_a=y;
> HttpRequest(param_a)....
>
> I can have a workaround where I call http request inside the If_Controller, but thought
it would be more elegant to have it outside since in both cases it is the same Http Request
sampler, but just with different values of param_a.
>
> If_Controller
>         user defined varables
> If_Controller
>         user defined varables
> Http Request Sampler
>
> Amela
>
> >From: sebb <sebbaz@gmail.com>
> >Date: Sun Apr 09 11:48:42 CDT 2006
> >To: JMeter Users List <jmeter-user@jakarta.apache.org>
> >Subject: Re: Problem passing parameter values from If-Controller
>
> >Pre-Processors, Post-Processors and Timers are only processed if there
> >is a Sampler in the same scope.
> >
> >Why do you need an If Controller without any samplers underneath it?
> >
> >S.
> >On 08/04/06, Amela Abadzic <amelaa@verizon.net> wrote:
> >>
> >> I have a  test plan with an If-Controller used to calculate several params which
are then passed to an Http Request Sampler  outside of If- Controllers. So the flow looks
like this:
> >>
> >> 1. IF-Controller
> >> 1.1     User Params (added as preprocessor to If-Controller
> >> 1.1.1. param_a = ${_StringFromFile(${__property(fullPath)}${__property(pnrFileCert)},,,)}
> >> 2. HttpRequest which uses param_a to pass values.
> >>
> >> Problem is that the HttpRequest doesn't resolve the value of ${param_a}. If
I add inside the If-Controller one JavaRequest (I used it just to see the value of param_a),
it works fine. If I disable it or remove JavaRequest it fails. It doesn't make sense to me,
becauseI discovered that JavaRequest doesn't have any referecne to param_a, and it will still
make the outer Http Request to be able to resolve param_a.
> >>
> >> Any help is very much appreciated,
> >> Amela
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message