Reputation: 47
Is there any way to validate whether a specific value is returned within the entire response which we get from Postman tool and set pass/fail conditions. for eg., my URL will be like https://www.testdomain.com/login?memberedu=123 and the specific value I am expecting in the response should be containing any of the following values ie.,'value1', 'value2', or 'value3' and if anything else returned for that parameter then it should fail. I am trying this in parallel with Postman tool also but so far couldn't figure out a proper way to get this validated.
Here, I am trying to validate education value. Thanks in advance.
Upvotes: 0
Views: 300
Reputation: 167992
Configure it as follows:
That's it, JMeter will automatically extract the EDUCATIONCATEGORY
attribute value and check whether it is equal to M.S. (Engg.)
. If there will be a mismatch - JMeter will mark the parent sampler as failed and report the difference:
Check out JsonPath Getting Started article to lean more about implementing correlation/pass fail criteria for JSON data in JMeter tests.
Also going forward please avoid posting code as image
Upvotes: 1