Skip to main content

What is a test?

In Qapir, a test is a collection of test-steps defined in a YAML file. Each test-step contains an 'action' (usually a network-call) and 'validations', which are defined using a specialized SQL-like syntax called qtl.

Test-steps are executed sequentially, in the same order they appear in the YAML file. Every test-step can be retried with a desired interval and retry-limit. If all attempts of a test-step fail - the test is marked as failed and no further test-steps are executed. That said, similar to individual test-steps, the whole test-scenario can be retried.

The qtl syntax is used to perform 'validations' on responses and variables. It allows you to:

  1. Find data in response-payloads and variables via jsonpath, then extract it into test-variables.
  2. Perform various types of validation on extracted data.

The ability to extract data from response-payloads and save it in environment-variables and test-variables allows Qapir to pass data from one test-step to others. This in turn allows you to implement complex test-scenarios that involve multiple network -calls or other types of 'actions'!