No,
I need to integrated a gigantic JSON file (entirely). => .check(jsonPath("$").saveAs(“ALL”))
I save the response and then integrate it in a post request (to place and order).
Yet everytime it fails so I looked at the attributes =>
ALL → {“allowedProducts”:[400,5200,210,100,5910,200,9500,5100,5900,300,110],“bgCategory”:{“majorCode”:5,“majorCodeName”:“Alternatieve beleggingsfondsen”,“minorCode”:7,“minorCodeName”:“Mixfondsen 50- 50”,“name”:“Mixfondsen 50/ 50”,“riskProfile”:“D”},“bgCommercialName”…
And saw that the entire JSON response is chronological. Which is really strange, because I have used it before and it did not do this.
When I look in my browser I see how the Json should be =>
What you’re seeing is not your original JSON payload but a String representation of the Java parsed tree.
If you want your full payload, don’t use jsonPath but bodyString.
Then, if you want to re-serialize some branch into JSON, you’ll have to walk on the wild side as this is a new feature that we’ll release in 2.1 in December. See https://github.com/gatling/gatling/issues/2360
This feature is already available in 2.1 snapshots deployed on Sonatype.
Beware that Gatling 2.1 targets Scala 2.11 instead of 2.10, so if you use Gatling through IDE or maven plugin, you’ll have to migrate. Using the bundle should be pretty straightforward.