Assert
Assert steps are color-coded green in the visual editor. Assert steps validate the value or type of data in a test.
Assert Equals and Assert Different
Assert Equals steps will pass when the value and expression are the same. In contrast, Assert Different steps will pass when the value and expression are not equal. These steps are particularly useful for checking that your API response status is a specific value.
Assert Exists
The Assert Exists step passes if the expression has been declared and contains a value.
Assert Type
The assert type step checks that the expression is one of the following data types: string, number, boolean, object/array, or undefined. The Assert Type step will pass when the expression is of the specified type.
Assert In
The Assert In step is used to search an array and will pass when one of the possible values is found in the expression.
JSON Validate
The JSON Validate step uses the JSON Schema Docs to validate complex JSON responses. The step will pass if the expression passes the valid JSON schema code.
Assert Greater Equal and Assert Smaller Equal
The Assert Greater Equal step will pass when the value is greater than or equal to the expression. In contrast, the Assert Smaller Equal step will pass when the value is smaller than or equal to the expression. These steps are particularly useful for checking that your API response time is less than the time, in milliseconds, specified in your SLAs.
Updated 10 months ago