jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Luu <>
Subject Re: JSON encoded URL problem
Date Tue, 05 Mar 2013 22:42:30 GMT
I would think a preprocessor is best to deal with that. You could probably
JSON/URL decode that back into the original string in the preprocessor. It
doesn't have to be in Beanshell/Java, could be in Javascript with one of
the other preprocessors. Whatever is easiest to decode the string. Like in
PHP, there's a json_decode(str) method that will do that for you.

On Tue, Mar 5, 2013 at 10:12 AM, Marcelo Jara <>wrote:

> I am using a Regex Extractor to get a URL for the next step in the test
> plan. The Url will change whether the request was successful or not. Here
> is an example:
> {"success":true,"successUrl":"/checkout/thankyou?email=77220130305125322mg07gkqup3%
> I am extracting the URL correctly using
> successUrl":"(.*?)"
> However, when I try to use it in the next sampler, I get an error. Example:
> The error is
> Illegal character in query at index 85:
> I believe this is due to the JSON response which converted '&' to "\u0026"
> in the URL.
> What's the best way to handle this? Do I need to use a Beanshell
> Preprocessor to substitute "\u0026" back to '&' ?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message