You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "nam.truong" <na...@objectconsulting.com.au> on 2008/07/14 10:21:30 UTC
Defining a variable value of 'line feed' (ASCII character)
Hello,
I would like to assign the value of a line feed character (ASCII 10) to a
user defined variable.
So far my attempt to paste the character into JMeter is only producing a
whitespace character. The usual ALT-010 hotkey isn't working for me either
(this produces nothing).
Does anyone have a clue how this character may be set as a value?
Cheers,
Nam
--
View this message in context: http://www.nabble.com/Defining-a-variable-value-of-%27line-feed%27-%28ASCII-character%29-tp18439414p18439414.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: Defining a variable value of 'line feed' (ASCII character)
Posted by sebb <se...@gmail.com>.
On 15/07/2008, nam.truong <na...@objectconsulting.com.au> wrote:
>
> That's done it!
>
> Going by your first suggestion, I've edited the JMX and entered a line feed
> character directly as a value as follows:
>
> <elementProp name="lf" elementType="Argument">
> <stringProp name="Argument.name">lf</stringProp>
> <stringProp name="Argument.value">
> </stringProp>
> <stringProp name="Argument.metadata">=</stringProp>
> </elementProp>
>
> Works a treat.
Since the JMX is XXML, you could also use:
<stringProp name="Argument.value">
</stringProp>
>
> It's worth noting that if I attempt to edit this value now from the GUI, it
> gets changed back to a whitespace character. But as long as I don't touch it
> then everything works fine.
>
> Thanks for the help seb-2-2. Much appreciated.
>
> Cheers,
> Nam
>
>
>
> sebb-2-2 wrote:
> >
> > On 14/07/2008, nam.truong <na...@objectconsulting.com.au> wrote:
> >>
> >> Hello,
> >>
> >> I would like to assign the value of a line feed character (ASCII 10) to
> >> a
> >> user defined variable.
> >>
> >> So far my attempt to paste the character into JMeter is only producing a
> >> whitespace character. The usual ALT-010 hotkey isn't working for me
> >> either
> >> (this produces nothing).
> >>
> >> Does anyone have a clue how this character may be set as a value?
> >>
> >
> > I don't think this is possible using the GUI.
> >
> > You may be able to do this by editting the JMX file - create a
> > variable and edit its value.
> >
> > Otherwise, the only ways I can think of are:
> >
> > Define a JMeter or system property as:
> >
> > LF=\u000a
> >
> > and use it as ${__P(LF)}
> >
> > Use Beanshell or Jexl to define the variable: vars.put("LF","\n");
> > Use Regular Expression Post-Processor to extract a LineFeed from a
> > response.
> > Maybe the property "line.separator" would be suitable:
> > ${__P(line.separator)}
> >
> >> Cheers,
> >> Nam
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Defining-a-variable-value-of-%27line-feed%27-%28ASCII-character%29-tp18439414p18439414.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
> >
> >
> >
>
>
> --
> View this message in context: http://www.nabble.com/Defining-a-variable-value-of-%27line-feed%27-%28ASCII-character%29-tp18439414p18455791.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: Defining a variable value of 'line feed' (ASCII character)
Posted by "nam.truong" <na...@objectconsulting.com.au>.
That's done it!
Going by your first suggestion, I've edited the JMX and entered a line feed
character directly as a value as follows:
<elementProp name="lf" elementType="Argument">
<stringProp name="Argument.name">lf</stringProp>
<stringProp name="Argument.value">
</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
Works a treat.
It's worth noting that if I attempt to edit this value now from the GUI, it
gets changed back to a whitespace character. But as long as I don't touch it
then everything works fine.
Thanks for the help seb-2-2. Much appreciated.
Cheers,
Nam
sebb-2-2 wrote:
>
> On 14/07/2008, nam.truong <na...@objectconsulting.com.au> wrote:
>>
>> Hello,
>>
>> I would like to assign the value of a line feed character (ASCII 10) to
>> a
>> user defined variable.
>>
>> So far my attempt to paste the character into JMeter is only producing a
>> whitespace character. The usual ALT-010 hotkey isn't working for me
>> either
>> (this produces nothing).
>>
>> Does anyone have a clue how this character may be set as a value?
>>
>
> I don't think this is possible using the GUI.
>
> You may be able to do this by editting the JMX file - create a
> variable and edit its value.
>
> Otherwise, the only ways I can think of are:
>
> Define a JMeter or system property as:
>
> LF=\u000a
>
> and use it as ${__P(LF)}
>
> Use Beanshell or Jexl to define the variable: vars.put("LF","\n");
> Use Regular Expression Post-Processor to extract a LineFeed from a
> response.
> Maybe the property "line.separator" would be suitable:
> ${__P(line.separator)}
>
>> Cheers,
>> Nam
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Defining-a-variable-value-of-%27line-feed%27-%28ASCII-character%29-tp18439414p18439414.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
>
>
>
--
View this message in context: http://www.nabble.com/Defining-a-variable-value-of-%27line-feed%27-%28ASCII-character%29-tp18439414p18455791.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: Defining a variable value of 'line feed' (ASCII character)
Posted by sebb <se...@gmail.com>.
On 14/07/2008, nam.truong <na...@objectconsulting.com.au> wrote:
>
> Hello,
>
> I would like to assign the value of a line feed character (ASCII 10) to a
> user defined variable.
>
> So far my attempt to paste the character into JMeter is only producing a
> whitespace character. The usual ALT-010 hotkey isn't working for me either
> (this produces nothing).
>
> Does anyone have a clue how this character may be set as a value?
>
I don't think this is possible using the GUI.
You may be able to do this by editting the JMX file - create a
variable and edit its value.
Otherwise, the only ways I can think of are:
Define a JMeter or system property as:
LF=\u000a
and use it as ${__P(LF)}
Use Beanshell or Jexl to define the variable: vars.put("LF","\n");
Use Regular Expression Post-Processor to extract a LineFeed from a response.
Maybe the property "line.separator" would be suitable: ${__P(line.separator)}
> Cheers,
> Nam
>
> --
> View this message in context: http://www.nabble.com/Defining-a-variable-value-of-%27line-feed%27-%28ASCII-character%29-tp18439414p18439414.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