Docs/Flows
#

Flows

Reference for E2E tests (flows) in Cofactor. Node types, flow types, status, health, Regression, Run configuration and node deactivation in Flow Designer.

An E2E test is a flow: a path of nodes that follows one user journey through your application. The CLI and API call it a workflow. To write one, see End-to-end tests.

Find your flows

Select E2E tests in the sidebar, under Test studio. New E2E test creates a flow and opens it in Flow Designer.

Node types

Every node has a type. The nodeType value is what the CLI and API use. The label is what Flow Designer shows.

nodeTypeLabelWhat it does
loginActing AsSigns in as a persona or credential.
navigateNavigateGoes to a URL or path.
actionActionClicks, types or interacts. Can carry inline assertions.
assertionAssertionChecks something on the page.
seedSeed DataRuns a seed flow first to provision data.
call_flowRun a flowRuns another flow and uses its outputs.
sandbox_actionSandbox actionRuns a server-side script on the run's sandbox.
api_sequenceAPI SequenceCalls API endpoints with no browser.
mcpMCPDrives an MCP server with no browser.
conditionConditionBranches on true or false, or fails the run on an exact check.
waitWaitPauses before continuing.
notificationNotificationSends an email or an SMS.
audioAudio inputPlays a clip into the browser microphone.
audio-assertionAudio assertionChecks audio the page played.
visual_checkpointVisual checkpointCompares a screen state with a baseline.
endEndEnds the flow as pass or fail.
setupSetup FlowRuns another flow first. Deprecated.

Fields for each node are on Core nodes, Specialty nodes and Assertions. Seed Data and Setup are on Setup, seed and teardown.

Deactivate a node

To remove a step from runs without deleting it, open the node's menu and choose Deactivate. The node is dimmed with a dashed border, records skipped in runs, and the run continues. The menu then offers Reactivate. Flow Designer does not offer Deactivate on Condition and End nodes.

bash
cofactor workflow node deactivate <workflow id> <node id> --reason "Checkout redesign"
cofactor workflow node activate <workflow id> <node id>

What the server checks

Cofactor validates a flow when you start a run and when you add it to Regression. Checks include at least one node, every node connected, and a first node that is Login, Navigate, Seed Data, API Sequence, MCP or Setup.

Flow types

standard is the default. seed provisions shared data and teardown cleans up after it. Neither can join Regression. setup is a deprecated prerequisite flow that runs before the flows that use it. See Setup, seed and teardown.

Status

A new flow is active. Any other status keeps the flow in its suites and excludes it from suite runs.

Statuses are Active, Paused (taken out of suite runs for now), Blocked (cannot pass yet, for example while a bug is open), Under construction and Deprecated. To change status, use the status control at the top of the Activity tab, or the CLI. --set takes active, paused, blocked, under_construction or deprecated.

bash
cofactor workflow status <workflow id> --set paused --reason "Checkout redesign" --ticket <issue id or URL>
cofactor workflow pause <workflow id>
cofactor workflow unpause <workflow id>

Health

Cofactor recomputes health after each run.

HealthMeaning
UnverifiedNo finished runs of the current version.
Never passedIt has run but has never passed.
PassingRecent runs pass.
ReliableFive or more clean passes in a row.
FlakyThe latest run passed, but one of the last ten runs failed or passed only after a retry.
FailingThe latest run failed on a flow that has passed before.
DegradedFive or more failures in a row on a flow that is in a suite and has passed before. Suite runs skip it until you edit it or re-enable it.

When you start a test run, select Re-enable degraded flows to clear Degraded and run those flows again.

Regression

Regression is your default suite. Adding a flow needs a saved flow of type standard or setup that passes validation. It does not need a run. In Flow Designer, the header button reads Add to regression, then In regression once the flow is a member. Select it again to remove the flow.

CLI: cofactor workflow add-to-regression <workflow id> and remove-from-regression.

Run a flow

Select Run Flow in the header. To choose browser, viewport, environment or inputs first, use Run with config in the run menu. Select Stop Run to stop a run.

bash
cofactor workflow run <workflow id> --environment "Staging" --stream

--sandbox <sandbox id> runs on a sandbox you claimed. --viewport <preset> overrides the saved viewport for one run. The presets are desktop, desktop_large, laptop, tablet and mobile. See Runs for results.

Versions

A flow keeps a history of its definitions. Use cofactor workflow revisions list|get|restore <workflow id>. Run cofactor workflow --help for all commands.