Did you try
this:
https://github.com/smartrics/JMeterRestSampler

or this:
https://github.com/ty1er/JMeterRestSampler

or this:
https://github.com/ATLANTBH/jmeter-components

?
regards
karl


Am 14.03.2012 17:06, schrieb Pulkit Singhal:
When JMeter gets back a REST response (fyi - most of the colon symbols are
only there for indentation purposes) like this one:
:   :   :   :   "fields":
:   :   :   :   {
:   :   :   :   :   "name":"Here to Stay [RVG Edition]"
:   :   :   :   }

And the response is run through a BSF PostProcessor like so:
// Turn the JSON response into a JS object
var response = eval( "(" + prev.getResponseDataAsString() + ")" );

Then it ends up parsing the value this way:
fields.name =
Here to Stay
[
:   RVG Edition
]

It seems to me that the [RVG Edition] inside "Here to Stay [RVG Edition]"
is being interpreted as an array based on the above output.

Questions:
1) Is my assumption correct?
2) Has anyone run into this kind of corner case before when testing with
JMeter?
3) Is eval a bad way to interpret REST responses by converting them into JS
objects when it comes to data like this?
4) Is there workaround or an entirely different way to go about processing
REST responses?



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to