Hi, As it turns out after several hours of experimentation - the closest
solution so far is setting all the default values in User Defined Values and
then overriding them as necessary using the BeanShell Sampler - so both the a
UDV element and the Beanshell use the same name i.e. UDV name: 'varKeyword',
UDV value: 'UDVVar' and beanshell vars.put("varKeyword", "bean");
As for your suggestion Flavio regarding the test strategy, I will give that
some deeper investigation.
Thanks to both of you so far.
> Date: Tue, 26 Feb 2013 09:42:53 -0300
> Subject: Re: Using default request values and overriding within GUI
> From: [email protected]
> To: [email protected]
>
> Please correct me if I'm wrong. User Defined Variable are set at the very
> start of the test. If you add more than one UDV its values will be
> overridden by the last UDV in test plan tree, except if they are disabled
> or in different Threads Groups.
>
> Maybe if he use an UDV and a BeanShell Pre-Processor instead, considering
> that Timers, Pre-Processors and Post-Processors are executed for every
> sampler inside the node it is added?
>
> If the distinct values of those 100 parameters are static values, define a
> logic for each test plan parameter's value field. Let's say that you have 3
> different set of values for those 100 parameters, you could, for example,
> as value of parameter 1 use ${__javaScript((${__P(test_strategy, 1)} == 3)
> ? 'C' : ((${__P(test_strategy, 1)} == 2) ? 'B' : 'A'))}
>
>
> 2013/2/25 Shmuel Krakower <[email protected]>
>
> > Well, I guess you currently either using the parameters directly in your
> > samplers.
> > If that so, you can add to the root of your test plan (or any other place
> > you need) a User Defined Variables config element.
> > Simply define a variable name and put ${__P(PORT, 7001)} as the value of
> > it. In your samplers simply use the new variable.
> >
> > This way, you can duplicate this UDV config element few time, define other
> > default values and simple enable/disable the config elements accordingly.
> >
> > Best,
> >
> > Shmuel Krakower.
> > www.Beatsoo.org - re-use your jmeter scripts for application performance
> > monitoring from worldwide locations for free.
> >
> >
> > On Mon, Feb 25, 2013 at 10:20 PM, Gavin Maselino
> > <[email protected]>wrote:
> >
> > > So within Jmeter I can use the property function to set a value which
> > > remains if not overridden at the command line like so:
> > >
> > > ${__P(PORT, 7001)}
> > >
> > > What I would like to know is if that can be overridden from within the
> > GUI
> > > by CSV or user defined variable or anything else?
> > >
> > > I ask as I have up to approx 100 parameter values across 12 different
> > http
> > > requests that I may need to manipulate depending on the test so I'd
> > prefer
> > > to store those in the GUI so maintenance/change is simpler.
> > >
> > >
> > >
> >