Assertions and Conditions: The Basics

Setting conditions on an API basis

You have total control over what is and isn't a pass, and the power to control what is and isn't expected.

Override default HTTP codes

In the example shown, we are overriding the default settings to set a HTTP 500 code as a pass and, therefore, a 200 code becomes a fail.



You want to validate that a call cannot succeed from a particular geography or a call with an OAuth scope of a particular kind always fails. In these scenario a Pass is operationally a problem.


Check a Response Body for a Specific String

You can examine the returned response body for a string. For instance, if you expect the string "Coffee Shop" to appear in the JSON payload, yiu can check to see if it's there and raise an Error if it's not.


Set an Alert based on a timing issue

You can set an alert depending on the length of the call or a component of the call. For instance, you can set the response type to Passed but slow if the Total Latency is greater than 1000 ms.


What’s Next

Next up, using variables and how to do it.