Hi,
I need to simulate load on a json web service.
It is possible to json encode a request and to json decode the
response ?
Hi Paul,
I still have to write the WebService cookbook page on the Wiki…
You don’t have to handle JSON this way (encode/decode).
What you can do is:
- use a file body for sending JSON to the server: https://github.com/excilys/gatling/wiki/HTTP#wiki-request-body
- use JSONPath (or regexp) for extracting some data: https://github.com/excilys/gatling/wiki/Checks#wiki-json
Does this suits your needs?
Cheers,
Steph
2012/4/4 Paul Langeard <agpaul5@gmail.com>
Tanks Stéph,
I Will check that and provide my feedback :).
Hi,
downloaded the last version of gatling, I discover the json-support
branch (https://github.com/excilys/gatling/tree/json-support).
Did youo have more information about ?
This branch has more or less been dropped.
It was a tentative for XPath-like checks on JSON document based in Jackson Streaming API.
This approach was way too limited in regard to XPath features, so I finally implemented in the master a Jaxen implementation based on Jackson Tree Model.
This approach is less efficient as the whole DOM-like object tree is loaded in memory, but it should support XPath 1.0.
https://github.com/excilys/gatling/wiki/Checks#wiki-json
2012/4/6 Paul Langeard <agpaul5@gmail.com>