Hi ! I'm trying to evaluate each value from a Json output. I tried the options.postprocess that works very well, but because I want to test different values from the same output, I have to make several assertions and it results with having multiple pass or failed test.
The problem is, I want the result to be at the end just one assert in the eval that says if the output has passed (so every values from the Json are correct) or has failed.
Here's an example:
expected_output : {name: Edgar, age: 28, remark: shy}
ouput : {name: Edgar, age: 28, remark: too shy}
When I do my assertions, I have to test if the name is equal, age is equal, remark is similar.
It results in three assertions to test
postprocess: JSON.parse(output).name
postprocess: JSON.parse(output).age
postprocess: JSON.parse(output).remark
Is there a way to make just one assertion and yet test every single value with a different type ?
I know it can be done by calling a custom assertion with a script, but if there's a way to do it without an external script, it would be practical.
Thank you (I hope I'm clear in the description of my issue ^^)