Add an assertion
Switch to Post processors.
Hover over Add PostProcessor, select Assertion.
In this case, I want to assert that if the response "id" is a positive integer.
So fill in the Assertion form:
Name: "id" is a positive integer
Target Object: Response JSON
JSONPath expression:
Assertion: Greater than 0
So fill in the Assertion form:
Name: "id" is a positive integer
Target Object: Response JSON
JSONPath expression:
$.category.id
Assertion: Greater than 0
Click Send, and you will see the Assertion result in the bottom right corner.
Click "Save" to save the endpoint case.
Modified atΒ 2025-03-14 10:52:03