jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: How do I convert extract value from Regular Expresion to integer
Date Sun, 07 Feb 2010 15:18:06 GMT
On 07/02/2010, glc <galic@orcanos.com> wrote:
>
>  Thanks for your prompt response :)
>  the  thing is , i already know the values extracted to the variable are only
>  digits.
>  What  i'm trying to do is post the extracted number as int ,it should be
>  posted to a web service http request field that would only except int values
>  or else the request would fail. (i'm using it for functional tests)
>  When   i run this http request it fails cause the extracted value is read as
>  string...
>  any   ideas??

What have you put in the HTTP request field?
Are you sure it is just the digits?
Use Tree View Listener to check.

What is the error message from the server?
Are you sure it means that the field is not an int?
Or does it mean that the field cannot be converted to an int?

>  thanks !
>
>  glc
>
>
>
>
>  sebb-2-2 wrote:
>  >
>  > On 07/02/2010, glc <galic@orcanos.com> wrote:
>  >>
>  >>  Hi all !
>  >>
>  >>  I'm mew to Jmeter and really would appriciate help,
>  >>  In my test I am extracting a value from the HTTP Web Service response
>  >> and
>  >>  needs to use this exctracted results back into another Web Service
>  >> request
>  >>  which accept only integer.
>  >>
>  >>  I am am using the following extraction method:
>  >>
>  >>  Return Result: STRING_#### (the # stands for the numric part of the
>  >> string)
>  >>  Regular Expression extractor: (RESPONSE_STRING(.+))
>  >>
>  >>  Now I am having the #### as string and I need to pass it as Integer to
>  >> the
>  >>  next request.
>  >
>  > The JMeter GUI elements only accept text as input.
>  > Some of them require the text to be restricted to decimal digits, but
>  > none require Integers.
>  >
>  > So just make sure that you only extract the digits into the variable.
>  >
>  >>  i already used _javascript function by fuction helper dialog in jmeter
>  >> but
>  >>  it didnt work
>  >>
>  >>   ${__javaScript(${__javaScript(parseInt('${STRING}'))}
>  >> ,INT_VARIABLE_NAME)}
>  >>
>  >>  what test element should i use and how excatly?
>  >
>  > Nowhere, see above.
>  >
>  >>  thanks in advance
>  >>
>  >>
>  >>
>  >>
>  >>  --
>  >>  View this message in context:
>  >> http://old.nabble.com/How-do-I-convert-extract-value-from-Regular-Expresion-to-integer-tp27487616p27487616.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
>  >
>  >
>  >
>
> :confused::confused::confused:
>
> --
>  View this message in context: http://old.nabble.com/How-do-I-convert-extract-value-from-Regular-Expresion-to-integer-tp27487616p27489442.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


Mime
View raw message