Skip to content

Test suite commands

The CLI provides commands for validating and managing E2Engine TestSuites.

e2engine validate testsuite
e2engine create testsuite
e2engine get testsuite
e2engine get testsuites
e2engine run testsuite
e2engine delete testsuite

For the TestSuite resource model and specification format, see Test suites.

Validate a TestSuite specification before creating it:

Terminal window
e2engine validate testsuite <spec-path>

For example:

Terminal window
e2engine validate testsuite testsuite.yaml

If the specification is valid, the command prints:

TestSuite spec is valid

Validation checks the specification against the TestSuite model and its validation rules without creating a persistent TestSuite resource.

Use --verbose or -v to display the validated TestSuite:

Terminal window
e2engine validate testsuite testsuite.yaml --verbose

Table output provides a compact representation of the resource. Use JSON or YAML to inspect the complete validated model:

Terminal window
e2engine validate testsuite testsuite.yaml -o yaml -v
Terminal window
e2engine validate testsuite testsuite.yaml -o json -v

Use --quiet or -q when only the command result is needed:

Terminal window
e2engine validate testsuite testsuite.yaml --quiet

A successful validation produces no output. An invalid specification returns an error.

This form is useful in scripts and CI/CD pipelines.

Create a TestSuite from a specification:

Terminal window
e2engine create testsuite <spec-path>

For example:

Terminal window
e2engine create testsuite testsuite.yaml

On success, the default output identifies the created resource:

created testsuite, name: smoke id: <testsuite-id> version: 1.0.0

Use --verbose to display the created TestSuite instead of the compact confirmation:

Terminal window
e2engine create testsuite testsuite.yaml --verbose

The default table format shows the resource metadata. JSON and YAML expose the complete created TestSuite:

Terminal window
e2engine create testsuite testsuite.yaml -o yaml -v

With --quiet, the command prints only the ID of the created TestSuite:

Terminal window
e2engine create testsuite testsuite.yaml --quiet

This is useful when another command or script needs to capture the new resource ID.

Retrieve a TestSuite using its name or an ID prefix:

Terminal window
e2engine get testsuite <ref>

For example:

Terminal window
e2engine get testsuite smoke

or:

Terminal window
e2engine get testsuite <testsuite-id-prefix>

The default table output provides a compact view of the resource.

Use YAML or JSON to retrieve its complete structured representation:

Terminal window
e2engine get testsuite smoke -o yaml
Terminal window
e2engine get testsuite smoke -o json

This includes the TestSuite specification and its selectors.

List stored TestSuites using the plural testsuites command:

Terminal window
e2engine get testsuites

The default output is a table containing:

Column Description
ID Compact TestSuite ID
NAME TestSuite name
VERSION Resource version
CREATED Creation timestamp
UPDATED Last update timestamp

Use --limit to restrict the maximum number of TestSuites returned:

Terminal window
e2engine get testsuites --limit 20

Values above the configured maximum are capped automatically.

Results can be ordered by:

id
name
version
createdAt
updatedAt

Select the field with --order-by:

Terminal window
e2engine get testsuites --order-by name

Select ascending or descending order with --order-direction:

Terminal window
e2engine get testsuites \
--order-by updatedAt \
--order-direction desc

Use JSON or YAML when the list is consumed programmatically:

Terminal window
e2engine get testsuites -o json
Terminal window
e2engine get testsuites -o yaml

For table output, use --no-headers to omit column headings:

Terminal window
e2engine get testsuites --no-headers

Run a TestSuite against an Environment:

Terminal window
e2engine run testsuite <testsuite-ref> <env-ref>

The TestSuite reference comes first, followed by the Environment reference.

For example:

Terminal window
e2engine run testsuite smoke payment-demo

The TestSuite selectors are resolved when the execution starts. The resolved Tests are then executed against the Environment.

The command creates a TestSuiteExecution and prints its ID:

created testsuite execution with id: <testsuite-execution-id>

Use the TestSuiteExecution ID to inspect the execution and its current status.

How the execution proceeds depends on the configured transport.

With transport.kind: direct, execution is synchronous. The run command waits for the TestSuite to finish before returning.

With transport.kind: socket, execution is asynchronous. The command creates the TestSuiteExecution and returns its ID while execution continues through the configured runner. The TestSuiteExecution and its child TestExecutions are updated as execution progresses.

In socket mode, retrieve the TestSuiteExecution to inspect its current state:

Terminal window
e2engine get testsuiteexecution <testsuite-execution-id>

The TestSuiteExecution contains the aggregate result and its individual TestExecutions.

See Running a test suite for the execution lifecycle.

Use --quiet or -q to print only the TestSuiteExecution ID:

Terminal window
e2engine run testsuite smoke payment-demo --quiet

This is useful when a script needs to capture the execution ID for subsequent commands.

--verbose produces the same output as the default mode for run commands.

Delete a TestSuite using its name or an ID prefix:

Terminal window
e2engine delete testsuite <ref>

For example:

Terminal window
e2engine delete testsuite smoke

On success, the command confirms the deleted resource:

deleted testsuite, name: smoke id: <testsuite-id> version: 1.0.0

Use --quiet to suppress the confirmation:

Terminal window
e2engine delete testsuite smoke --quiet

Singular TestSuite commands accept ts as a shorter alias:

Terminal window
e2engine validate ts testsuite.yaml
e2engine create ts testsuite.yaml
e2engine get ts smoke
e2engine run ts smoke payment-demo
e2engine delete ts smoke

The plural get testsuites command does not define a shorter alias:

Terminal window
e2engine get testsuites

The full testsuite and testsuites forms are used throughout this documentation for clarity.

TestSuite commands use the global CLI output options:

-o, --output string Output format (available: table, json, yaml)
--no-headers Omit headers in table output
-q, --quiet Suppress non-error output
-v, --verbose Enable verbose output

Table output is intended for interactive use, while JSON and YAML expose structured E2Engine data for inspection and automation.

See CLI for an overview of CLI conventions, Test suites for the TestSuite specification, and Inspecting results for interpreting TestSuiteExecution results.