Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Test design techniquesJuniorCommonTest design

How would you test a workflow whose behaviour depends on its current state?

Answer

Model the states, allowed events, resulting transitions and forbidden transitions. Cover valid paths, invalid events from each relevant state, terminal states and recovery or timeout behaviour.

Strong answer includes

  • states, events and transitions
  • invalid transitions
  • recovery and terminal states

Practical example

For an order that moves through New, Paid, Shipped, Delivered and Cancelled states, a tester builds a state diagram and checks valid paths like New to Paid to Shipped, but also tries invalid transitions such as shipping a Cancelled order or paying twice for the same order. They also verify that a payment timeout in the Paid-pending state correctly reverts the order to New instead of leaving it stuck.

Sources

DOU — QA interview: 250+ questionsDOU · Coverage signal across Junior, Middle, Senior, AQA, web, mobile and practical topicsISTQB CTFL syllabus v4.0.1ISTQB · Testing vocabulary, principles, lifecycle and test-design concepts