# What is state transition testing?

> State transition testing checks how an event changes a workflow from a given starting state. See when a parcel collection can be cancelled.

Source: https://cueapril.com/knowledge/definitions/state-transition-testing
Updated: 2026-12-02
Index: https://cueapril.com/llms.txt

## What is state transition testing?

State transition testing checks how a system responds to an event from a particular starting state. Each case names the starting state, the event, any condition that permits it and the expected outcome. It also checks what happens when the event is refused.

## Why does the starting state matter?

The same action can mean different things over a record’s lifetime. Seeing a record in every possible state still leaves questions about the routes between them. For a refused action, check the stored state and any visible side effects as well as the message shown to the user.

## Worked example: Cancelling a collection request

A customer may cancel a parcel collection while it is booked. Once the parcel has been collected, the same request should leave it marked collected and preserve its tracking history. These cases use one action and two starting states with different expected outcomes.

## Try it on your pull request

Choose a change in your repository and tell Cue April what should happen. Review the proposed checks before they run.

[Try Cue April on your repository](https://app.cueapril.com/sign-up/?next=%2Fquality-start)

## Related reading

- [How to test a state transition](https://cueapril.com/knowledge/how-to/test-state-transitions)

- [Decision table](https://cueapril.com/knowledge/definitions/decision-table)

- [Idempotency](https://cueapril.com/knowledge/definitions/idempotency)

[Browse the Knowledge base](https://cueapril.com/knowledge)
