mardi 19 mars 2019

Gatling - count responses attributes

I'm running a Gatling test. Each HTTP call returns a json response with attribute decision. I need to calculate number of different decisions grouped by decision attribute value.

For example, decision attribute could have accepted, rejected, error values. First, I need to count, group and save them in format like:

[
 "accepted": 31,
 "rejected": 10,
 "error": 9
]

and then validate that there are exact number of the responses with these values:

counter["accepted"] == 31
counter["rejected"] == 10
counter["error"] == 9

How can I do that?

Aucun commentaire:

Enregistrer un commentaire