Some developer thought that it would be a good idea to stash an entire json inside a HTML response body, something like:
//lots of html
Given this scenario I have to capture the deliveryCost.value value of the “code”:“normal” json object (in this case, 5.800).
I did a regex as follow:
.check(regex("\"code\":\"normal\"(.+?)\"value\":(.+?)}").exists.saveAs("deliveryCost"))
However in this case I have two matching groups and gatling is saving only the first one (or I’m miss interpreting its usage).
Is there any way to get the second group? I don’t mind about the first one, it is there just to show that there are more data in between.
I would love to simply use jsonpath, but I don’t know how to do it on this mixed scenario and there is no chance to change the code, the entire solution relies on this odd scenario and the developers are from another company abroad.
Thank you.