Blue index cards show a main path and a separate coral alternate branch.

Scenario paths

Context

Given describes an initial condition. Include only the setup needed to understand this example.

Path writer

Trigger

When names the action, not the hidden code that performs it.

Path writer

Outcome

Then should describe a visible message, state or delivery that can be checked.

Path writer

Alternate path

Keep a denied or interrupted path separate from the normal path so its expected outcome is unmistakable.

Path writer

Boundary

A boundary example can reveal a missing rule. Do not invent a decision for the product owner.

Path writer

Shareable steps

A copied scenario is a draft for human review. It has not run against the system.

Path writer
Private draftSources in contextVisible outcomes

One trigger. Two conditions.

Main path

Start where the rule applies.

Changed condition

Give the alternate route its own outcome.

Write both paths ↗

Path writer

Enter context, action and outcome for one path, then add a contrasting condition. Copy a reviewable scenario; this does not execute it.

Editable examples
Drafts stay on this pageCucumber · Gherkin reference

Another angle

Given describes an initial condition. Include only the setup needed to understand this example.

What is true before the action?

Follow the work

Both paths distinct?

A drafted test, an observed result and a release decision are different events. Keep each one tied to the product you actually checked.