1Writing Use Case Scenarios
▶
A use case scenario is one of the most powerful tools in a business analyst's or systems designer's repertoire. Where a use case itself describes what a system must support, the use case scenario describes precisely how that support unfolds — step by step, actor by actor, condition by condition. Writing good use case scenarios is both a discipline and a craft: the document must be rigorous enough to drive development and testing, yet clear enough that a business stakeholder can read it and confirm it matches their intent. This topic walks through every element of a well-constructed use case scenario, from the header that identifies and controls the document to the final postcondition that certifies a goal has been met.
The sections that follow treat each structural component in depth. Together they form a complete methodology for drafting use case scenarios that are traceable, testable, and unambiguous.
Structuring a Use Case Document
Before a single step of behavior is written, the use case document needs a solid structural skeleton. Structure is what makes a collection of use cases manageable across a large project and what allows any team member — developer, tester, or stakeholder — to locate exactly the information they need quickly.
Unique identifiers for traceability. Every use case must carry a unique identifier. A common convention is a prefix that signals the system or module followed by a sequential number: UC-001, UC-002, and so on. Some organizations include a category code, such as UC-ORD-001 for an order management use case. The identifier is not cosmetic; it is the anchor for traceability. When a developer implements a feature, they reference UC-012. When a tester writes a test case, they link it to UC-012. When a change request arrives, the team can immediately see which use cases are affected. Without unique identifiers, traceability collapses into a guessing game.
Use case names as verb phrases. The name of a use case should always be a short, purposeful verb phrase that captures the actor's goal. Good examples include Submit Order, Reset Password, Generate Monthly Sales Report, and Approve Leave Request. Poor names include Order Screen (names a screen, not a goal), Order Processing (vague and passive), or The User Does Something with the Cart (imprecise and not in phrase form). The verb-phrase convention keeps the team focused on outcomes rather than technology, and it makes a list of use cases readable as a catalog of system capabilities.
Uniform template application. Every use case in a project should be documented using the same template. This consistency is not bureaucratic rigidity — it is a practical necessity. When templates differ, reviewers must mentally re-orient with each document they open, and automated tools that parse use cases for requirements management cannot function reliably. Establish the template early, communicate it to all contributors, and enforce it in reviews. A minimal standard template typically includes fields for: identifier, name, description, actors, preconditions, main success scenario, alternative flows, exception flows, postconditions, and version history.
Version history and approval status. The document header should contain a version history table and an explicit approval status field. Version history allows the team to understand how the use case has evolved — critical when a late-breaking change is disputed and the team needs to know what was agreed to at project kickoff versus what was agreed to in sprint three. Approval status (Draft, Under Review, Approved, Deprecated) prevents a developer from implementing a scenario that is still being debated by stakeholders. The table below shows a typical header structure:
| Field | Example Value |
|---|---|
| Use Case ID | UC-ORD-003 |
| Use Case Name | Submit Order |
| Author | J. Morales |
| Date Created | 2024-03-10 |
| Last Updated | 2024-04-02 |
| Version | 1.3 |
| Status | Approved |
| Approved By | Product Owner — S. Chen |
A version history section below the header would log each version with the date, the author, and a brief note describing what changed (for example, v1.2 — Added alternative flow A2 for guest checkout).
Writing the Main Success Scenario
The main success scenario (sometimes called the basic flow or happy path) describes the sequence of events that unfolds when everything goes as intended: the actor has the right permissions, the data is valid, the system is available, and the user achieves their goal. It is the spine of the use case; all alternative and exception flows branch from and return to it.
One discrete action or system response per step. Each numbered step must describe exactly one thing that happens. Compare these two approaches:
- Weak: "The Customer logs in, navigates to the cart, reviews the items, and clicks Submit."
- Strong: Step 3 — The Customer clicks the Submit Order button. Step 4 — The System validates the cart contents against current inventory. Step 5 — The System displays the order confirmation page with a unique order number.
The weak version bundles four distinct actions into one sentence. If step 3 fails during testing, testers cannot pinpoint which of the four actions failed. Atomic steps eliminate that ambiguity.
Active voice from the actor's or system's perspective. Every step should begin with the actor's name or the word "System" followed by a verb in the active, present tense. This convention makes it immediately clear who is responsible for each action. For example: "The Customer enters a shipping address in the Shipping Address field." Not: "A shipping address is entered." The passive voice obscures who acts, which matters enormously when the scenario is used to assign responsibilities or write tests.
Completeness for testability. A tester should be able to sit down with the main success scenario and verify each step independently. This means steps must be specific enough to be observable. "The System processes the payment" is not testable as written — a tester cannot observe "processes." Rewritten: "The System sends a charge request to the payment gateway and receives an approval response." Now the tester knows exactly what to look for in logs or on screen.
The final step confirms goal achievement. The last step of the main success scenario should always leave no doubt that the actor's goal has been fully achieved. For a Submit Order use case, an appropriate final step would be: "The System sends an order confirmation email to the Customer's registered email address." This closes the loop — the customer not only sees a confirmation on screen but receives durable proof of the transaction.
A condensed example of a main success scenario for Submit Order (UC-ORD-003) illustrates all four principles:
Main Success Scenario
1. The Customer clicks the "Proceed to Checkout" button from the Shopping Cart page.
2. The System displays the Checkout page pre-populated with the Customer's saved shipping address and default payment method.
3. The Customer reviews the order summary, shipping address, and payment details.
4. The Customer clicks the "Submit Order" button.
5. The System validates that all items in the cart are in stock.
6. The System submits a charge request to the Payment Gateway for the order total.
7. The Payment Gateway returns an approval code.
8. The System creates an order record in the database with status "Confirmed" and assigns a unique order number.
9. The System displays the Order Confirmation page showing the order number, itemized list, and estimated delivery date.
10. The System sends an order confirmation email to the Customer's registered email address.
[Goal achieved: Customer has placed and received confirmation of a valid order.]
Documenting Alternative Flows
Alternative flows (also called alternative paths or extensions) represent choices or variations that are still valid and successful — they are not errors. They answer the question: "What if the user does something different, but still achieves a legitimate outcome?"
Different valid choices at a given step. An alternative flow always branches from a specific step in the main scenario. The reference must be explicit: "At step 3, if the Customer selects a different shipping address..." This anchoring prevents alternative flows from floating in isolation — a reader always knows exactly where in the main flow the variation occurs.
Indicating where the flow rejoins or diverges. Every alternative flow must specify two things: where it branches off and what happens afterward — specifically whether it rejoins the main scenario (and at which step), ends the use case with a different successful outcome, or leads into an exception flow. For example:
Alternative Flow A1: Customer uses a new shipping address
Branches from: Step 3
A1.1 The Customer clicks "Add New Address."
A1.2 The System displays the Add Address form.
A1.3 The Customer enters the new address details and clicks "Save."
A1.4 The System validates the address format and saves the new address.
A1.5 The System updates the Checkout page with the new address selected.
Rejoins: Main flow at Step 3 (Customer continues reviewing checkout details).
Common types of alternative flows. Three categories of alternative flows appear repeatedly across use cases and deserve explicit attention:
- Selecting different options: The user picks a non-default but equally valid choice, such as selecting a different payment method (credit card instead of saved PayPal account).
- Using shortcuts: The user invokes a faster path to the same outcome, such as clicking a one-click purchase button that skips the checkout review page.
- Canceling an action: The user deliberately abandons the current task. This is valid behavior and should be documented as an alternative flow, not an exception. The flow should confirm that the system returns the user to a stable, appropriate state and that no unintended changes are persisted.
Incorporating alternative flows from task analysis. During task analysis and stakeholder interviews, analysts discover many variations in how users approach a task. Each variation that represents a legitimate path to a valid outcome should be captured as an alternative flow. If a task analysis reveals that 30% of users access the checkout from a wish list rather than the main shopping cart, that is an alternative flow worth documenting. A systematic approach — cataloging all discovered variations, evaluating each as an alternative versus an exception, and assigning each a unique identifier (A1, A2, A3, etc.) — prevents flows from being overlooked and ensures completeness.
Documenting Exception Flows
Exception flows represent situations where something goes wrong — an error occurs, input is invalid, an external system fails, or the system reaches an unexpected state. Unlike alternative flows, exception flows are not the user choosing a different path; they are disruptions that must be handled gracefully.
Triggers for exception flows. An exception flow is triggered by one of three categories of problems:
- Invalid input: The user enters data that fails validation (e.g., a malformed email address, a credit card number that fails the Luhn check).
- System errors: An internal component fails (e.g., the database is unavailable, a timeout occurs during processing).
- Unexpected states: The system discovers a condition it did not anticipate (e.g., an item that was in stock when added to the cart has since sold out).
Notifying the user of the problem. Every exception flow must describe exactly how the system communicates the problem to the user. Good exception handling is specific: the system must display a meaningful error message, not a generic "An error occurred." For example, if payment is declined, the message should indicate that payment was declined (without revealing security-sensitive details) and suggest what the user should do next. Vague error messages are a common complaint in usability studies and a direct symptom of poorly specified exception flows.
Recovery paths. Wherever the user can correct the problem and continue the main task, the exception flow must describe that recovery path explicitly. For example:
Exception Flow E2: Payment declined
Triggered at: Step 6 (Payment Gateway returns a decline response)
E2.1 The System displays a "Payment Declined" message on the Checkout page,
advising the Customer to verify payment details or use a different method.
E2.2 The System re-displays the Checkout page with the payment section highlighted.
E2.3 The Customer updates payment details or selects a different payment method.
Rejoins: Main flow at Step 4 (Customer clicks "Submit Order").
This recovery path means the user does not lose their cart contents or have to restart from the beginning — a critical usability and business requirement that would be missed if exception flows were undocumented.
Unrecoverable exceptions. Some exceptions cannot be resolved by the user during the session — for example, a complete database failure during order processing. For these cases, the exception flow must specify two things: how the system preserves any data the user has already provided (to avoid forcing them to re-enter everything if they try again), and how the system communicates the failure honestly. For example:
Exception Flow E4: System failure during order processing
Triggered at: Step 8 (System fails to write order record to database)
E4.1 The System rolls back the payment charge request to prevent billing without order creation.
E4.2 The System logs the full error details to the system event log.
E4.3 The System saves the Customer's cart contents to the session store for recovery.
E4.4 The System displays a "Service Temporarily Unavailable" message with a reference number
and instructs the Customer to try again in 10 minutes or contact support.
[No rejoining of main flow; use case ends in failure state.]
Specifying rollback and data preservation in the exception flow is not just good UX practice — it is a direct requirement handed to developers about transactional integrity.
Specifying Preconditions and Postconditions
Preconditions and postconditions are the use case's contract with the world. They state what must be true for the scenario to begin and what will be true when it ends. Without them, use cases float in a context-free vacuum — testers cannot set up test environments correctly and developers cannot know what state the system must be in before their code runs.
Preconditions must be verifiable. A precondition is a statement about the state of the system and its actors that must be confirmed as true before the use case begins. The key word is verifiable: a precondition must be something a tester or the system itself can actually check. Compare:
- Weak (vague): "The user is ready to order."
- Strong (verifiable): "The Customer is authenticated. The Customer's shopping cart contains at least one item. All items in the cart have a current price in the product catalog."
The strong version gives developers and testers concrete, testable facts. Vague preconditions lead to misunderstandings about what the system is expected to handle versus what should be enforced upstream.
Postconditions for the main flow. The main success scenario's postcondition should state, in verifiable terms, what is true after the scenario completes successfully. For Submit Order: "An order record exists in the database with status 'Confirmed.' The Customer's cart is empty. A charge has been applied to the Customer's payment method for the order total. A confirmation email has been delivered to the Customer's registered address." Each clause is independently verifiable — a tester can check the database, inspect the cart, verify the charge, and confirm email delivery.
Postconditions for alternative flows. Alternative flows may end in states that differ from the main success postcondition. A Cancel Order alternative flow might have the postcondition: "The Customer's cart is preserved with its original contents. No charge has been applied. The Customer is on the Shopping Cart page." This is a valid and complete outcome, just different from the full success state. Documenting it explicitly prevents a tester from incorrectly marking a cancelled-order scenario as a failure because the order record was not created.
Direct usability as test case inputs. Well-written preconditions and postconditions transform use cases into test case templates almost automatically. The precondition becomes the test setup. The main flow steps become the test actions. The postcondition becomes the pass/fail criteria. This tight mapping between use case documentation and testing is one of the primary reasons rigorous pre/postcondition specification pays off in reduced testing effort and fewer defects.
| Use Case Element | Maps to Test Case Element |
|---|---|
| Preconditions | Test setup / environment conditions |
| Main scenario steps | Test steps / actions |
| Main postconditions | Expected results / pass criteria |
| Alternative flow steps | Alternative test path actions |
| Alternative postconditions | Expected results for alternative paths |
| Exception flow triggers | Negative test conditions |
| Exception flow outcomes | Expected error handling / recovery results |
Writing Clear and Unambiguous Steps
Even a perfectly structured use case can fail in practice if its steps are written unclearly. Ambiguous steps are a leading cause of misalignment between what stakeholders intended, what developers built, and what testers verified. The following principles, applied consistently, eliminate the most common sources of ambiguity.
Use specific verbs, not vague ones. Words like "handles," "manages," "processes," and "deals with" tell the reader almost nothing about what concretely happens. Replace them with verbs that describe observable, specific actions:
- Instead of "The System processes the form," write "The System validates each required field for correct format and completeness."
- Instead of "The User interacts with the cart," write "The Customer clicks the Remove button next to the selected item."
- Preferred specific verbs include: clicks, enters, selects, displays, submits, navigates to, highlights, enables, disables, saves, redirects, sends, receives, validates, calculates.
Name the actor explicitly. Pronouns introduce ambiguity as soon as a use case involves more than one actor. In a system where a Customer, a Store Manager, and an automated Notification Service all participate, a step that reads "They confirm the change" is genuinely unclear. Always name the actor: "The Store Manager clicks the Confirm button." This applies to the system as well — write "The System" rather than "it."
One action per step, not compound sequences. Compound steps — those that describe two or more actions joined by "and" or "then" — violate the atomicity principle. If one action in a compound step fails, it is impossible to know precisely where the failure occurred. Consider:
- Compound (avoid): "The Customer enters a username and password and clicks Login."
- Atomic (preferred): Step 1 — The Customer enters a username in the Username field. Step 2 — The Customer enters a password in the Password field. Step 3 — The Customer clicks the Login button.
The atomic version looks more verbose, but it is far more useful during testing, debugging, and UI design — each interaction with the interface is separately accountable.
Managing technical jargon. Use cases are shared documents — read by developers, but also by product owners, business stakeholders, and QA teams with varying technical backgrounds. Technical terms should be used only when they add precision that everyday language cannot provide, and only if they are defined in a project glossary. For example, "The System executes a RESTful POST request to the payment endpoint" may be appropriate in a developer-facing specification, but in a use case reviewed by the Finance department, "The System submits the payment details to the payment service" conveys the same intent with far less confusion. Establishing and linking to a project glossary lets analysts use necessary technical terms without alienating non-technical readers.
The table below summarizes common step-writing pitfalls and their corrections:
| Pitfall | Example of the Problem | Corrected Version |
|---|---|---|
| Vague verb | The System handles the request. | The System validates the request parameters and returns an HTTP 200 response. |
| Pronoun instead of actor name | They click Submit. | The Customer clicks the Submit button. |
| Compound step | The Customer fills in the form and submits it. | Step 4: The Customer completes all required fields. Step 5: The Customer clicks Submit. |
| Passive voice obscuring actor | The order is confirmed. | The System displays an order confirmation message to the Customer. |
| Undefined jargon | The System fires a webhook. | The System sends an automated notification to the fulfillment service. [If "webhook" is in the glossary, it may be used as a parenthetical clarification.] |
| Non-verifiable step | The System processes the payment quickly. | The System submits the charge request and receives a response within 5 seconds. |
Taken together, these principles — structural rigor, a complete main scenario, systematically documented alternative and exception flows, verifiable pre/postconditions, and precise step writing — produce use case scenarios that serve every audience on a project. Developers get unambiguous implementation targets. Testers get ready-made test blueprints. Stakeholders get a readable narrative of system behavior they can validate against their real-world needs. And the organization gets a traceable, maintainable requirements artifact that can survive the inevitable changes of any project lifecycle.