The Astra CLI provides commands to execute a suite with a single line of code. The following command initializes a new Astra configuration file in the current folder.

The astra.json template created by the initialization command provides the following options.


The following export command exports the suite configured in the astra.json as code.


The following run command runs the suite configured in the astra.json.

Example 1:

Run the suite as defined in astra.json. The AstraUrl and the SuiteId need to be configured.

Example 2

Run the suite as defined in astra.json but with additional execution tags and higher timeout.

  • Uses astra.main.json as configuration file
  • Sets the three tags validation, PR15 and e2e on the test executions
  • Doubles the default timeout of 10 minutes to 20 minutes
  • Awaits test execution
  • Prints a summary to the standard output
  • Returns a non-zero exit code if any of the tests failed

Example 3

Run the suite in fire and forget mode and override the test base URL. The test results will not delay our impact your build pipeline. The test base URL can be used to run the tests against an installation of your target application different from the installation used for recording the test cases.

  • Triggers execution of the test without waiting (--fire-and-forget)
  • Replaces the base URL of each test execution to https://www.domain.ch