One check

A case fails for one reason.

One case answers one question. "A non-empty name can be saved" is one question. "You can save a name, then delete it, then invite a friend and change the language" is four. When such a case goes red, you do not know which of the four questions died.

A shared prefix of steps is no reason to glue checks together. Many cases have to log in. That is a precondition or a separate short login, not a licence to drag the user's entire day along. Duplicating the login is cheaper than not being able to understand a failure.

If two checks only live together because that is how the purchase flow works, there are still observable points between them: the cart, the payment, the receipt. A case ends at the nearest point. The next one starts from it as its precondition. That way a specific place fails.

The case title repeats the question, not a chapter of a novel. "An empty name is not saved" is better than "Form check, part 3, finale". From the title in a run report you can see what exactly is red without opening a wall of text.

Practice

  1. Why cut a scenario

    A long case went red at step ten. What is the trouble with gluing?

    • You will have to write a clearer name
    • It is unclear which question failed
    • There will be too few steps for a report
    • A precondition cannot be repeated
  2. The case name

    How should a check of an empty name be titled: as a question about behaviour, or as "part 3"?

  3. How to cut a purchase

    Select a sensible way to cut a long scenario.

    • A case up to the product appearing in the cart
    • The next case starts with a cart already filled
    • One case from login to the receipt and the email
    • The title "check everything"