Skip to main content
The openlayer tests command exports the test definitions (goals) for the current Openlayer project as JSON. This is useful for bootstrapping or syncing a local tests.json from tests defined in the platform. Its delete subcommand removes tests in bulk, so you don’t have to delete them one at a time in the UI.

Usage

Examples

Every exported test carries a tags list of tag names, so you can export a project, edit the tags, and push them back:
Export output
Any tag name your project doesn’t have yet is created when you push. A test with no tags field keeps whatever tags it has on the platform — see tags for the full behavior.
The export is wrapped in {"_meta": ..., "items": [...]}, while tests.json is the array of tests on its own. Take the items array when you turn an export into a tests.json:

Flags

openlayer tests delete

Archives — or, with --force, permanently deletes — the tests you select. Archiving hides a test while preserving its result history, and can be undone from the platform. --force deletes the test and all of its results, and cannot be undone. Tests are selected by the syncId you author in tests.json, by the test’s platform id, or by name. Each flag is repeatable and they can be mixed in a single command.

Examples

Flags

At least one of --sync-id, --id or --name is required.

Selector resolution

Before anything is modified, every selector must resolve to exactly one test. If any selector matches nothing — or if a --name matches more than one test — the command reports all of the problems at once and exits without removing anything, so a typo can’t leave a partially applied deletion behind:
The command then lists what it matched and asks for confirmation before acting.
In non-interactive mode (--output-mode ci, used by agents and CI pipelines) the confirmation prompt cannot be answered, so pass --yes — otherwise the command fails fast rather than hanging.
--force is irreversible: it deletes the tests and every result they have recorded. Run with --dry-run first if you’re selecting more than a couple of tests.