I'm trying to automate my test.
Basically it's a JSON request to get information about user.
My objective is to drive the response assertion through two different JSON assertion.
One for Positive Test Case, the other one for the Negative Test Case.
I've tried to implement this scenario:
ThreadGroup
+ Http Request
+ CSV Data Set Config -> set input and expected result
+ HTTP Header Manager -> get token from previous request
+ Regular Expression Extractor -> get Response Code
+ if Controller OK (${responseCode}=="200")
+ JSON Assertion
+ if Controller NOK (${responseCode}=="400")
+ JSON Assertion
this is the Regular Expression Extractor: 
this is the If Controller conf: 
But the "if controller" doesn't works, it means that the JSON Assertion is not called.
Do you know how to fix it, or another way to do it ?
thanks in advance!

Aucun commentaire:
Enregistrer un commentaire