You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Marc Rennhard <ma...@zhaw.ch> on 2008/05/29 16:41:00 UTC
Passing user defined variables with the jmeter -q command line option
Dear all,
(see also https://issues.apache.org/bugzilla/show_bug.cgi?id=45009)
I'm trying to use the jmeter -q command line option to pass a
user.properties file (which contains user defined variables) to jmeter
and access these properties within a testcase, but so have failed to use
this correctly. I have tried this using the following:
- In user.properties: url=www.google.com
- In a sampler: ${url}
But it didn't work.
So my questions are the following:
- Can I use this to pass "user defined variables" to jmeter that can be
accessed within a testcase via ${var}?
- How does this work in detail?
- What format is required for user.properties?
Thanks for any help,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Passing user defined variables with the jmeter -q command line option
Posted by sebb <se...@gmail.com>.
On 29/05/2008, Marc Rennhard <ma...@zhaw.ch> wrote:
> Dear all,
>
> (see also
> https://issues.apache.org/bugzilla/show_bug.cgi?id=45009)
>
> I'm trying to use the jmeter -q command line option to pass a
> user.properties file (which contains user defined variables) to jmeter
> and access these properties within a testcase, but so have failed to use
> this correctly. I have tried this using the following:
>
> - In user.properties: url=www.google.com
>
> - In a sampler: ${url}
>
> But it didn't work.
>
> So my questions are the following:
>
> - Can I use this to pass "user defined variables" to jmeter that can be
> accessed within a testcase via ${var}?
>
> - How does this work in detail?
>
> - What format is required for user.properties?
>
Variables are not the same as properties:
http://jakarta.apache.org/jmeter/usermanual/functions.html
in particular:
http://jakarta.apache.org/jmeter/usermanual/functions.html#__P
> Thanks for any help,
> Marc
>
>
> ---------------------------------------------------------------------
> 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
Re: Passing user defined variables with the jmeter -q command line option
Posted by sebb <se...@gmail.com>.
On 22/10/2008, norken76 <na...@yahoo.com> wrote:
>
> I used the -q option which worked fine!
> but still wonder why the first option (override the user.properties file
> name ) did not ?
I just explained that in my last message.
> thank you
>
>
>
> norken76 wrote:
> >
> > Hello all,
> > It looks to me that the initial question was not clear, anyhow, my
> > question is :
> > I was trying to override the 'user.properties' property in the
> > 'jmeter.properties' file to refere to a different file name, from the cmd
> > line. and this is not working. ???
> > the goal is to specify the user's properties file at the cmd line. I did
> > this :
> >
> > %JMETER_HOME%\bin\jmeter -n -ttest.jmx -Juser.properties=my.properties
> >
> > but this seems to not override the user.properties defined in
> > jmeter.properties. ?? I thought that the cmd line props are processed
> > first ????
> >
> > any idea ?
> > thank you !
> >
> >
> > sebb-2-2 wrote:
> >>
> >> On 29/05/2008, Stuart Findlay <st...@cp.net> wrote:
> >>> apologies - __P only works for properties supplied on the command line -
> >>> it's the __property function you need.
> >>>
> >>
> >> __P and __property work equally well.
> >>
> >> __P is bascially just a shorthand for __property.
> >>
> >>> http://jakarta.apache.org/jmeter/usermanual/functions.html#__property
> >>>
> >>> in your example you would need ${__property(url)}
> >>>
> >>>
> >>>
> >>>
> >>> Stuart Findlay wrote:
> >>>
> >>> > Properties aren't variables so you need to get them using the __P
> >>> function
> >>> >
> >>> > See
> >>> http://jakarta.apache.org/jmeter/usermanual/functions.html#__P
> >>> for details
> >>> >
> >>> > Marc Rennhard wrote:
> >>> >
> >>> > > Dear all,
> >>> > >
> >>> > > (see also
> >>> https://issues.apache.org/bugzilla/show_bug.cgi?id=45009)
> >>> > >
> >>> > > I'm trying to use the jmeter -q command line option to pass a
> >>> > > user.properties file (which contains user defined variables) to
> >>> jmeter
> >>> > > and access these properties within a testcase, but so have failed to
> >>> use
> >>> > > this correctly. I have tried this using the following:
> >>> > >
> >>> > > - In user.properties: url=www.google.com
> >>> > >
> >>> > > - In a sampler: ${url}
> >>> > >
> >>> > > But it didn't work.
> >>> > >
> >>> > > So my questions are the following:
> >>> > >
> >>> > > - Can I use this to pass "user defined variables" to jmeter that can
> >>> be
> >>> > > accessed within a testcase via ${var}?
> >>> > >
> >>> > > - How does this work in detail?
> >>> > >
> >>> > > - What format is required for user.properties?
> >>> > >
> >>> > > Thanks for any help,
> >>> > > Marc
> >>> > >
> >>> > >
> >>> > >
> >>> ---------------------------------------------------------------------
> >>> > > 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
> >>
> >>
> >>
> >
> >
>
> --
>
> View this message in context: http://www.nabble.com/Passing-user-defined-variables-with-the-jmeter--q-command-line-option-tp17537642p20115718.html
>
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Passing user defined variables with the jmeter -q command line
option
Posted by norken76 <na...@yahoo.com>.
I used the -q option which worked fine!
but still wonder why the first option (override the user.properties file
name ) did not ?
thank you
norken76 wrote:
>
> Hello all,
> It looks to me that the initial question was not clear, anyhow, my
> question is :
> I was trying to override the 'user.properties' property in the
> 'jmeter.properties' file to refere to a different file name, from the cmd
> line. and this is not working. ???
> the goal is to specify the user's properties file at the cmd line. I did
> this :
>
> %JMETER_HOME%\bin\jmeter -n -ttest.jmx -Juser.properties=my.properties
>
> but this seems to not override the user.properties defined in
> jmeter.properties. ?? I thought that the cmd line props are processed
> first ????
>
> any idea ?
> thank you !
>
>
> sebb-2-2 wrote:
>>
>> On 29/05/2008, Stuart Findlay <st...@cp.net> wrote:
>>> apologies - __P only works for properties supplied on the command line -
>>> it's the __property function you need.
>>>
>>
>> __P and __property work equally well.
>>
>> __P is bascially just a shorthand for __property.
>>
>>> http://jakarta.apache.org/jmeter/usermanual/functions.html#__property
>>>
>>> in your example you would need ${__property(url)}
>>>
>>>
>>>
>>>
>>> Stuart Findlay wrote:
>>>
>>> > Properties aren't variables so you need to get them using the __P
>>> function
>>> >
>>> > See
>>> http://jakarta.apache.org/jmeter/usermanual/functions.html#__P
>>> for details
>>> >
>>> > Marc Rennhard wrote:
>>> >
>>> > > Dear all,
>>> > >
>>> > > (see also
>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=45009)
>>> > >
>>> > > I'm trying to use the jmeter -q command line option to pass a
>>> > > user.properties file (which contains user defined variables) to
>>> jmeter
>>> > > and access these properties within a testcase, but so have failed to
>>> use
>>> > > this correctly. I have tried this using the following:
>>> > >
>>> > > - In user.properties: url=www.google.com
>>> > >
>>> > > - In a sampler: ${url}
>>> > >
>>> > > But it didn't work.
>>> > >
>>> > > So my questions are the following:
>>> > >
>>> > > - Can I use this to pass "user defined variables" to jmeter that can
>>> be
>>> > > accessed within a testcase via ${var}?
>>> > >
>>> > > - How does this work in detail?
>>> > >
>>> > > - What format is required for user.properties?
>>> > >
>>> > > Thanks for any help,
>>> > > Marc
>>> > >
>>> > >
>>> > >
>>> ---------------------------------------------------------------------
>>> > > 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
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Passing-user-defined-variables-with-the-jmeter--q-command-line-option-tp17537642p20115718.html
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: Passing user defined variables with the jmeter -q command line option
Posted by sebb <se...@gmail.com>.
On 22/10/2008, norken76 <na...@yahoo.com> wrote:
>
> Hello all,
> It looks to me that the initial question was not clear, anyhow, my question
> is :
> I was trying to override the 'user.properties' property in the
> 'jmeter.properties' file to refere to a different file name, from the cmd
> line. and this is not working. ???
> the goal is to specify the user's properties file at the cmd line. I did
> this :
>
> %JMETER_HOME%\bin\jmeter -n -ttest.jmx -Juser.properties=my.properties
>
> but this seems to not override the user.properties defined in
> jmeter.properties. ?? I thought that the cmd line props are processed first
> ????
The command-line and properties files are processed in this order:
-p propfile
jmeter.properties (or the file from the -p option) is then loaded
-j logfile
user.properties
system.properties
all other command-line options
So it is not possible to override the user.properties property.
Why do you need to do this? Won't the -q option do?
The user.properties file is loaded from the current directory, and
failing that, the JMeter bin directory, as described here:
http://jakarta.apache.org/jmeter/usermanual/get-started.html#configuring_jmeter
> any idea ?
> thank you !
>
>
>
> sebb-2-2 wrote:
> >
> > On 29/05/2008, Stuart Findlay <st...@cp.net> wrote:
> >> apologies - __P only works for properties supplied on the command line -
> >> it's the __property function you need.
> >>
> >
> > __P and __property work equally well.
> >
> > __P is bascially just a shorthand for __property.
> >
> >> http://jakarta.apache.org/jmeter/usermanual/functions.html#__property
> >>
> >> in your example you would need ${__property(url)}
> >>
> >>
> >>
> >>
> >> Stuart Findlay wrote:
> >>
> >> > Properties aren't variables so you need to get them using the __P
> >> function
> >> >
> >> > See
> >> http://jakarta.apache.org/jmeter/usermanual/functions.html#__P
> >> for details
> >> >
> >> > Marc Rennhard wrote:
> >> >
> >> > > Dear all,
> >> > >
> >> > > (see also
> >> https://issues.apache.org/bugzilla/show_bug.cgi?id=45009)
> >> > >
> >> > > I'm trying to use the jmeter -q command line option to pass a
> >> > > user.properties file (which contains user defined variables) to
> >> jmeter
> >> > > and access these properties within a testcase, but so have failed to
> >> use
> >> > > this correctly. I have tried this using the following:
> >> > >
> >> > > - In user.properties: url=www.google.com
> >> > >
> >> > > - In a sampler: ${url}
> >> > >
> >> > > But it didn't work.
> >> > >
> >> > > So my questions are the following:
> >> > >
> >> > > - Can I use this to pass "user defined variables" to jmeter that can
> >> be
> >> > > accessed within a testcase via ${var}?
> >> > >
> >> > > - How does this work in detail?
> >> > >
> >> > > - What format is required for user.properties?
> >> > >
> >> > > Thanks for any help,
> >> > > Marc
> >> > >
> >> > >
> >> > >
> >> ---------------------------------------------------------------------
> >> > > 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
> >
> >
> >
>
> --
>
> View this message in context: http://www.nabble.com/Passing-user-defined-variables-with-the-jmeter--q-command-line-option-tp17537642p20115121.html
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Passing user defined variables with the jmeter -q command line
option
Posted by norken76 <na...@yahoo.com>.
Hello all,
It looks to me that the initial question was not clear, anyhow, my question
is :
I was trying to override the 'user.properties' property in the
'jmeter.properties' file to refere to a different file name, from the cmd
line. and this is not working. ???
the goal is to specify the user's properties file at the cmd line. I did
this :
%JMETER_HOME%\bin\jmeter -n -ttest.jmx -Juser.properties=my.properties
but this seems to not override the user.properties defined in
jmeter.properties. ?? I thought that the cmd line props are processed first
????
any idea ?
thank you !
sebb-2-2 wrote:
>
> On 29/05/2008, Stuart Findlay <st...@cp.net> wrote:
>> apologies - __P only works for properties supplied on the command line -
>> it's the __property function you need.
>>
>
> __P and __property work equally well.
>
> __P is bascially just a shorthand for __property.
>
>> http://jakarta.apache.org/jmeter/usermanual/functions.html#__property
>>
>> in your example you would need ${__property(url)}
>>
>>
>>
>>
>> Stuart Findlay wrote:
>>
>> > Properties aren't variables so you need to get them using the __P
>> function
>> >
>> > See
>> http://jakarta.apache.org/jmeter/usermanual/functions.html#__P
>> for details
>> >
>> > Marc Rennhard wrote:
>> >
>> > > Dear all,
>> > >
>> > > (see also
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=45009)
>> > >
>> > > I'm trying to use the jmeter -q command line option to pass a
>> > > user.properties file (which contains user defined variables) to
>> jmeter
>> > > and access these properties within a testcase, but so have failed to
>> use
>> > > this correctly. I have tried this using the following:
>> > >
>> > > - In user.properties: url=www.google.com
>> > >
>> > > - In a sampler: ${url}
>> > >
>> > > But it didn't work.
>> > >
>> > > So my questions are the following:
>> > >
>> > > - Can I use this to pass "user defined variables" to jmeter that can
>> be
>> > > accessed within a testcase via ${var}?
>> > >
>> > > - How does this work in detail?
>> > >
>> > > - What format is required for user.properties?
>> > >
>> > > Thanks for any help,
>> > > Marc
>> > >
>> > >
>> > >
>> ---------------------------------------------------------------------
>> > > 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
>
>
>
--
View this message in context: http://www.nabble.com/Passing-user-defined-variables-with-the-jmeter--q-command-line-option-tp17537642p20115121.html
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: Passing user defined variables with the jmeter -q command line option
Posted by sebb <se...@gmail.com>.
On 29/05/2008, Stuart Findlay <st...@cp.net> wrote:
> apologies - __P only works for properties supplied on the command line -
> it's the __property function you need.
>
__P and __property work equally well.
__P is bascially just a shorthand for __property.
> http://jakarta.apache.org/jmeter/usermanual/functions.html#__property
>
> in your example you would need ${__property(url)}
>
>
>
>
> Stuart Findlay wrote:
>
> > Properties aren't variables so you need to get them using the __P function
> >
> > See
> http://jakarta.apache.org/jmeter/usermanual/functions.html#__P
> for details
> >
> > Marc Rennhard wrote:
> >
> > > Dear all,
> > >
> > > (see also
> https://issues.apache.org/bugzilla/show_bug.cgi?id=45009)
> > >
> > > I'm trying to use the jmeter -q command line option to pass a
> > > user.properties file (which contains user defined variables) to jmeter
> > > and access these properties within a testcase, but so have failed to use
> > > this correctly. I have tried this using the following:
> > >
> > > - In user.properties: url=www.google.com
> > >
> > > - In a sampler: ${url}
> > >
> > > But it didn't work.
> > >
> > > So my questions are the following:
> > >
> > > - Can I use this to pass "user defined variables" to jmeter that can be
> > > accessed within a testcase via ${var}?
> > >
> > > - How does this work in detail?
> > >
> > > - What format is required for user.properties?
> > >
> > > Thanks for any help,
> > > Marc
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > 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
Re: Passing user defined variables with the jmeter -q command line
option
Posted by Stuart Findlay <st...@cp.net>.
apologies - __P only works for properties supplied on the command line -
it's the __property function you need.
http://jakarta.apache.org/jmeter/usermanual/functions.html#__property
in your example you would need ${__property(url)}
Stuart Findlay wrote:
> Properties aren't variables so you need to get them using the __P
> function
>
> See http://jakarta.apache.org/jmeter/usermanual/functions.html#__P for
> details
>
> Marc Rennhard wrote:
>> Dear all,
>>
>> (see also https://issues.apache.org/bugzilla/show_bug.cgi?id=45009)
>>
>> I'm trying to use the jmeter -q command line option to pass a
>> user.properties file (which contains user defined variables) to jmeter
>> and access these properties within a testcase, but so have failed to use
>> this correctly. I have tried this using the following:
>>
>> - In user.properties: url=www.google.com
>>
>> - In a sampler: ${url}
>>
>> But it didn't work.
>>
>> So my questions are the following:
>>
>> - Can I use this to pass "user defined variables" to jmeter that can be
>> accessed within a testcase via ${var}?
>>
>> - How does this work in detail?
>>
>> - What format is required for user.properties?
>>
>> Thanks for any help,
>> Marc
>>
>>
>> ---------------------------------------------------------------------
>> 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
Re: Passing user defined variables with the jmeter -q command line
option
Posted by Stuart Findlay <st...@cp.net>.
Properties aren't variables so you need to get them using the __P function
See http://jakarta.apache.org/jmeter/usermanual/functions.html#__P for
details
Marc Rennhard wrote:
> Dear all,
>
> (see also https://issues.apache.org/bugzilla/show_bug.cgi?id=45009)
>
> I'm trying to use the jmeter -q command line option to pass a
> user.properties file (which contains user defined variables) to jmeter
> and access these properties within a testcase, but so have failed to use
> this correctly. I have tried this using the following:
>
> - In user.properties: url=www.google.com
>
> - In a sampler: ${url}
>
> But it didn't work.
>
> So my questions are the following:
>
> - Can I use this to pass "user defined variables" to jmeter that can be
> accessed within a testcase via ${var}?
>
> - How does this work in detail?
>
> - What format is required for user.properties?
>
> Thanks for any help,
> Marc
>
>
> ---------------------------------------------------------------------
> 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
RE: Passing user defined variables with the jmeter -q command line option
Posted by Steve Kapinos <St...@tandberg.com>.
The user.properties file if used does not need to be specified if in the
working directory. It will be loaded automatically. Specify if you
need to load additional property files.
Format in files is simply
Property=value
One per line. Note these are PROPERTIES, not variables. They behave
differently. You can load a property's value into a variable if desired
in your testplan using the __P function. Make sure you read up on the
behavior of properties vs variables in the documentation.
-Steve
-----Original Message-----
From: Marc Rennhard [mailto:marc.rennhard@zhaw.ch]
Sent: Thursday, May 29, 2008 10:41 AM
To: jmeter-user@jakarta.apache.org
Subject: Passing user defined variables with the jmeter -q command line
option
Dear all,
(see also https://issues.apache.org/bugzilla/show_bug.cgi?id=45009)
I'm trying to use the jmeter -q command line option to pass a
user.properties file (which contains user defined variables) to jmeter
and access these properties within a testcase, but so have failed to use
this correctly. I have tried this using the following:
- In user.properties: url=www.google.com
- In a sampler: ${url}
But it didn't work.
So my questions are the following:
- Can I use this to pass "user defined variables" to jmeter that can be
accessed within a testcase via ${var}?
- How does this work in detail?
- What format is required for user.properties?
Thanks for any help,
Marc
---------------------------------------------------------------------
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