Use Validations

Help Topics
Validations defined in the project properties can be used to specify custom validation rules for the request item. To specify custom validation rules for the request item, open request item properties, switch to 'Validation' tab and select one of the following two options:
  • Execution is successful if response status code equals 1xx, 2xx, or 3xx; if this option is selected, executions will be validated only according to the returned http status code. In general, all executions with the status code from the ranges 1xx, 2xx or 3xx will be considered successful, all executions with status code from other ranges will be considered unsuccessful.
  • Execution is successful if response status code equals 4xx or 5xx; if this option is selected, executions will be validated only according to the returned http status code. In general, all executions with the status code from the ranges 4xx or 5xx will be considered successful, all executions with status code from other ranges will be considered unsuccessful.
  • Execution is successful if the specified logical expression evaluates to true; if this option is selected, executions will be validated according to the validation rule specified in the validation expression field. Particular execution will be considered successful only if it passes the complete validation rule defined. In all other cases, execution will be considered unsuccessful. To be able to specify validation rule for the request item, validations must already be defined in project properties. For more information on how to specify validations in project properties, see the corresponding topic.

Add custom validation rule

To add custom validation rule you have to combine project validations and operators into logical expression. The following rules apply:
  • Enclose project validation names in curly braces.
  • Available logical operators are AND, OR, and NOT.

Expression Example

{validation} AND {validation_1} OR NOT {validation_2}

You can press 'Ctrl+Space' when inside the field to see the list of available project validations or 'Ctrl+Shift+Space' to see the list of available logical operators.

For more information about using validations, see corresponding topic in 'How to' section.