Docs/Test suites
#

Test suites

Reference for Cofactor test suites. Named suites, Regression, layers, staging, failure mode, running a suite and the CLI commands that manage suites.

A test suite is a reusable group of flows that you run together. A test run is one execution of it. The suite sets which flows belong, what order they run in and what a failure does.

Regression and named suites

Regression is your default suite. A flow joins it with Add to regression. See Flows. Regression cannot be renamed, archived or deleted.

A named suite is one you build yourself. Use one when order matters, or when you want a smaller set than Regression.

Select Suites in the sidebar, then the Suites tab to list suites. Select New suite to create one. Each suite has a Run button and a menu with Edit and Archive. Archiving hides the suite and keeps the run history. The Schedules tab holds the schedules that run suites. See Suites and schedules.

Layers

A named suite arranges its flows in layers.

  • Flows in the same layer run in parallel.
  • A layer starts after the one before it finishes.

Put flows that prepare data in an early layer, and the flows that need them in a later one. The builder numbers layers from 1. The CLI numbers them from 0.

Staging

A named suite member can sit in Staging. A staged flow does not run until you add it to a layer. Regression has no staging.

Failure mode

On layer failure has two settings. Set it when you create the suite, or in the suite's settings.

SettingfailureModeBehavior
Continue through all layerscontinueLater layers run even after a failure. This is the default.
Stop if a layer failsstop_on_layer_failureWhen a flow fails, times out or is canceled, the layers after it do not run. Their rows are skipped. A platform error does not stop the suite.

Seeds and suites

A Seed Data node can run once for the whole suite or once for each layer.

Run a suite

Run a suite with its Run button, from Start Test Run, from a schedule, or from the CLI. A suite needs at least one flow in a layer to run.

bash
cofactor test-suite run --suite "Checkout"

A suite does not run paused, blocked, under construction, deprecated or degraded flows. See Which flows run.

Manage suites from the CLI

CommandWhat it does
cofactor test-suite suitesList named suites.
cofactor test-suite suites get <id|name>Show one suite.
cofactor test-suite create --name <name> [--failure-mode <mode>]Create a suite.
cofactor test-suite update <id|name>Change the name, description or failure mode.
cofactor test-suite members <id|name>Show members by layer.
cofactor test-suite set-members <id|name> [--layer <flows>]... [--staging <flows>]Replace all members.
cofactor test-suite delete <id|name> --yesArchive a suite. Its run history stays.

Each --layer takes flow names or ids, separated by commas. Layer order is the order of the flags. Pass at least one --layer or --staging. Add --yes when the suite already has members.

bash
cofactor test-suite set-members "Checkout" --layer "Sign in" --layer "Add to cart,Pay"

Your own Playwright tests run in an external suite. See Bring your own suite.