Skip to main content

Shared steps

A shared step is a block of steps maintained in one place and used in many test cases. "Sign in as a returning customer" is written once; the forty cases that start with it point at that one definition.

Creating one​

Settings → Shared steps → Create. Give it a name and the steps it contains, exactly as you would inside a test case.

Using one​

In a test case's step editor, insert a shared step instead of writing a new one. It renders in place, in order, marked as shared so a reader can see the block is maintained elsewhere.

What changes when you edit one​

Editing a shared step changes every case that uses it, from the next time each is read. That is the point, and it is also the risk: a shared step used by forty cases is a forty-case edit. The screen tells you how many cases reference it before you save.

A bug hunt's copy of a case follows the library's steps, so a shared step edited today shows its new words in every hunt holding a case that uses it, the next time that case is opened there. Results already recorded on the step stay.

When not to use one​

If two cases share three steps by coincidence rather than by meaning, leave them alone. A shared step is a statement that these steps are the same thing and should change together. Extracting every repeated pair produces a library where no case can be read end to end without opening four other records.

Availability​

Shared steps are available on every plan, from Starter upwards.