What is Use Case Specification?

Just showing the use case diagram in UML notation is not enough. Each use case accompanied by text explaining the purpose of the use case as well as what functionality is accomplished when a use case is executed.

The use case specification is typically created in analysis and design phase in an iterative manner.

  • At first, only a brief description of the steps needed to carry out the normal flow of the use case (i.e., what functionality is provided by the use case) is written.
  • As analysis progresses, the steps are fleshed out to add more detail.
  • Finally, the exceptional flows are added to the use case
  • Each project can adopt a standard use case template for the creation of the use case specification.

Use Case vs Use Case Specification

A Use Case describes a task that is performed by an actor yielding a result of business value for a business. A use case may be visualized as a use case diagram or/and in structured textual specification format:

Use Case vs Use Case Specification

Use Case (task - a customer want to perform) may be:

  • Interactive - A system use case describes an actor's interaction with a system in pursuit of the defined business goal
  • Manual - A sequence of actions performed by an actor
  • Automated - A sequence of steps performed by a program or script

Characteristics of Use Cases

A use case has:

  • Only one goal
  • A single starting point
  • A single ending point
  • Multiple paths for getting from start to finish
    • i.e. Specify behavior for a variety of possible conditions
    • Each conditions may require specific action(s)
Characteristics of Use Cases

For Example - Customer pays bill:

Customer pays bill

There are multiple paths to achieve the goal:

  • Telephone payment
  • By mail
  • In person
  • by check
  • by cash, etc.

A path that does not lead to the goal:

  • Credit card is declined

Agile Use Case Approach

The use case model and its individual use cases evolve level by level over time. Not all use cases of a model will necessarily need to be specified to the same level of detail.

Just-in-Time and Just-Enough

Use cases can be written at differing levels of data and scope, each serves a purpose:

  • Summary: General descriptions and sweeping overviews of system functionality or business processes.
  • User Level : Task-related descriptions of users and how they interact with the system; descriptions of a specific business process. User-Level use cases are usually considered to be at the level of task that is the main work of the user.
  • For example: getting cash out of the ATM machine is a useful task and would be a use case at the core level, but entering your PIN number would not be at this level, because it supports the main work.

  • Sub-function: Descriptions of lower-level activities that are used to complete subparts of a core use case.
Agile Use Case Approach

Note: Some use cases may be sufficiently specified up to level II. You stop when sufficient detail is achieved using just-in-time and just-enough manner.

A Detailed Use Case Specification

The detailed use case is a textual representation illustrating a sequence of events together with other related use case information in certain format. People typically adopt a standard use case template for recording the detailed information for the use cases

A Detailed Use Case Specification

Use Case Template - ATM withdraw case example

As mentioned before, there are several notation styles for use cases (e.g. diagram style, unified modeling language, textual format). Whatever notation is used should be easy to understand. You can use templates, like the ones from Alistair Cockburn, but it is also an option to use what fits best for your team.

Use Case Specification
Use Case Name: Withdraw Cash
Actor(s): Customer (primary), Banking System (secondary)
Summary Description: Allows any bank customer to withdraw cash from their bank account.
Priority: Must Have
Status: Medium Level of details
Pre-Condition: The bank customer has a card to insert into the ATM
The ATM is online properly
Post-Condition(s):
  • The bank customer has received their cash (and optionally a receipt)
  • The bank has debited the customer's bank account and recorded details of the transaction
Basic Path:
  1. The customer enters their card into the ATM
  2. The ATM verifies that the card is a valid bank card
  3. The ATM requests a PIN code
  4. The customer enters their PIN code
  5. The ATM validates the bank card against the PIN code
  6. The ATM presents service options including "Withdraw"
  7. The customer chooses "Withdraw"
  8. The ATM presents options for amounts
  9. The customer selects an amount or enters an amount
  10. The ATM verifies that it has enough cash in its hopper
  11. The ATM verifies that the customer is below withdraw limits
  12. The ATM verifies sufficient funds in the customer's bank account
  13. The ATM debits the customer's bank account
  14. The ATM returns the customer's bank card
  15. The customer takes their bank card
  16. The ATM issues the customer's cash
  17. The customer takes their cash
Alternative Paths:
  1. 2a. Invalid card
  2. 2b. Card upside down
  3. 5a. Stolen card
  4. 5b. PIN invalid
  5. 10a. Insufficient cash in the hopper
  6. 10b. Wrong denomination of cash in the hopper
  7. 11a. Withdrawal above withdraw limits
  8. 12a. Insufficient funds in customer's bank account
  9. 14a. Bank card stuck in machine
  10. 15a. Customer fails to take their bank card
  11. 16a. Cash stuck in machine
  12. 17a. Customer fails to take their cash
    • a ATM cannot communicate with Banking System
    • b Customer does not respond to ATM prompt
Business Rules:
  1. B1: Format of PIN
  2. B2: Number of PIN retries
  3. B3: Service options
  4. B4: Amount options
  5. B5: Withdraw limit
  6. B6: card must be taken away before dispense of cash
Non-Functional Requirements:
  1. NF1: Time for complete transaction
  2. NF2: Security for PIN entry
  3. NF3: Time to allow collection of card and cash
  4. NF4: Language support
  5. NF5: Blind and partially blind support

Turn every software project into a successful one.

We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as described in our Cookie Policy.

OK