On 04/01/2008, Wing Tang <[EMAIL PROTECTED]> wrote:
> Hi Andre,
>
> The User Parameters is not the one that I need, since it needs to be
> parameters global for all threads. I will try to explain it more specific
> what my problem is.
>
> My test server has the following properties which i set in the User Defined
> Variables:
> server.name --> test
> server.name.port --> 7778
> server.name.protocol --> http
>
> And my other server has the following set of properties whic i set in the
> second User Defined Variables:
> server.name --> si
> server.name.port --> 9778
> server.name.protocol --> http
I suggest you just define all of these as properties:
jmeter -Jserver.name=si -Jserver.name.port=9778 etc
and refer to them using as ${__P(server.name)} etc.
If your test already uses variable references such as ${server.name}
a lot, you could avoid changing it by defining the variables on the
test plan:
name value
server.name ${__P(server.name)}
> when i run my test i want to control the set of properties by passing an
> environment variable which can be used to determine which set of the
> properties can be used.
JMeter does not have access to environment variables.
> For instance if i set the env property on dev than it the If Controller
> should give me the properties which I defined in the first controller. And
> if it is env=si than it should return the second If Controller User Defined
> Variables
>
> > -Thread Group
> > -- If Controller (( "${env}" == "dev" ))
> > --- User Defined Variables (servername, serverport, protocol of the
> > development environment)
> > -- If Controller (( "${env}" == "si" ))
> > --- User Defined Variables (servername, serverport, protocol of the system
> > integration environment)
>
>
> Wing
>
> On 1/4/08, André van Hoorn <[EMAIL PROTECTED]>
> wrote:
> >
> > Hi,
> >
> > not sure whether I understood you correctly, but:
> > Try using "User Parameters" (underneath the "Pre Processors") instead of
> > "User Defined Variables" (and check "Update Once Per Iteration"). User
> > Parameters are local to a thread (which I think is what you need)
> > whereas User Defined Parameters are global to all threads.
> >
> > Best regards,
> >
> > André
> >
> >
> > Wing Tang wrote, on 04.01.2008 11:20:
> > > Hello,
> > >
> > > I have the following scenario which i cant get to work correctly, it
> > always
> > > return the last set of the User Defined Variables.
> > >
> > >
> > > I have a generic login script that i want to use for different
> > enviroments,
> > > for instance a Development (dev) enviroment and a System Integration
> > (si)
> > > enviroment.
> > > In Jmeter i have created the following structure in order to set the
> > > corresponding user defined variables for the different enviroments,
> > these
> > > are variables like servername, serverport and protocol:
> > >
> > > -Thread Group
> > > -- If Controller (( "${env}" == "dev" ))
> > > --- User Defined Variables (servername, serverport, protocol of the
> > > development environment)
> > > -- If Controller (( "${env}" == "si" ))
> > > --- User Defined Variables (servername, serverport, protocol of the
> > system
> > > integration environment)
> > >
> > >
> > > The problem is that when i set my env on dev, than it returns the last
> > set
> > > of the User Defined Variables which is the system integration.
> > >
> > > Hopefully someone can explain or help me out whether i am doing it wrong
> > or
> > > is it just not possible what i want?
> > >
> > > Thanks in advance,
> > >
> > > Wing
> > >
> >
> >
> > --
> > Dipl.-Inform. André van Hoorn
> > Software Engineering Group
> > University of Oldenburg, D-26111 Oldenburg, Germany
> > Room A2 2-235
> > Tel: +49 (0)441 798-2365
> > E-Mail: [EMAIL PROTECTED]
> > URL: http://se.informatik.uni-oldenburg.de/Members/andrevh
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Met vriendelijke groet,
>
> Wing Tang
> mob: +31624870322
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]