Use Case Path Requirements
A
use case path requirement is a
functional
requirement that specifies a single
path thorugh a
use
case that shall be implemented by a single:
The typical objectives of a use case path requirement are
to:
- Ensure that the application or component successfully
provides the required use case path functionality to a
specific external (e.g., human actor, external
application).
- Enable use case models to be used for the analysis and
specification of functional requirements.
The following are typical examples of use case
requirements:
- Automatic Teller Machine:
- Normal Path: Successful Withdrawal.
“The ATM shall enable an account holder to
withdraw an account-holder specified amount of funds from
an associated account if:
- The withdrawal amount is the some of one or more
$20 bills.
- The withdrawal will not make the account
overdrawn.
- The withdrawal when added with previous withdrawals
for the day will not exceed the maximum daily account
withdrawal limit.
- There is no hold on the account.”
- Normal Path: Successful Fash-Cash
Withdrawal.
“The ATM shall enable an account holder to
withdraw a specified amount of funds from an associated
account if:
- The withdrawal amount is one of the system
specified amounts of $20, $40, $100, or $200.
- The withdrawal will not make the account
overdrawn.
- The withdrawal when added with previous withdrawals
for the day will not exceed the maximum daily account
withdrawal limit.
- There is no hold on the account.”
- Exceptional Path: Account Overdrawn.
“The ATM shall not enable an account holder
to withdraw any amount of funds from an associated
account if the account is currently
overdrawn.”
- Exceptional Path: Account Becomes
Overdrawn.
“The ATM shall not enable an account holder
to withdraw any amount of funds from an associated
account if the withdrawal amount will make the account
overdrawn.”
- Digital Thermostat Example:
- Normal Path: Increase Desired
Temperature.
“When turned on, the digital thermostat shall
enable the user to increase the current desired
temperature of the room by an increment of integral
degrees to a temperature of up to and including the
maximum allowed temperature for the current temperature
scale.”
- Normal Path: Decrease Desired
Temperature.
“When turned on, the digital thermostat shall
enable the user to decrease the current desired
temperature of the room by an decrement of integral
degrees to a temperature of down to and including the
minimum allowed temperature for the current temperature
scale.”
- Exceptional Path: Digital Thermostat Turned
Off.
“When turned off, the digital thermostat
shall not enable the user to change the current desired
temperature of the room”
- Normal Path: Decrease Desired
Temperature.
“When turned on, the digital thermostat shall
enable the user to decrease the current desired
temperature of the room by an decrement of integral
degrees to a temperature of down to and including the
minimum allowed temperature for the current temperature
scale.”
- Normal Path: Maintain Desired
Temperature.
“The digital thermostat shall control the air
conditioner and furnace to maintain the actual
temperature of the room within engineering tolerances of
the desired temperature of the room.”
- Normal Path: Air Conditioner Failed.
“The digital thermostat shall notify the user
if the air conditioner fails.”
- Global Personal Marketplace (GPM), an Online
Auction Example:
- Normal Path: Single Bid Placed.
“The GPM shall enable a buyer to place a
single new bid on an auction if:
- The new bid is at or above the minimum bid
amount.
- The new bid increment is at or above the minimum
bid increment amount.
- The bid is not for more items than are currently
available for auction.
- The auction is open.”
- Normal Path: Automatic Proxy Bid Placed.
“The GPM shall enable a buyer to establish an
automatic proxy bid if:
- The initial proxy bid is at or above the minimum
bid amount.
- The new proxy bid increment is at or above the
minimum bid increment amount.
- The proxy bid is not for more items than are
currently available for auction.
- The auction is open.”
- Normal Path: Instant Win Price Bid.
“The GPM shall enable a buyer to place a
single instant win bid if:
- The bid is equal to the instant win bid
amount.
- The bid is not for more items than are currently
available for auction.
- The auction is open.”
- Exceptional Path: Bid Below Minimum Bid.
“The GPM shall not enable a buyer to place a
bid of any kind if the bid is below the minimum bid
amount.”
- Exceptional Path: Bid Increment Below Minimum Bid
Increment.
“The GPM shall not enable a buyer to place a
bid of any kind if the bid increment is below the minimum
bid increment amount.”
- Exceptional Path: Excessive Quantity
Requested.
“The GPM shall not enable a buyer to place a
bid of any kind if the bid is for more items than are
currently available for auction.”
- Exceptional Path: Auction Closed.
“The GPM shall not enable a buyer to place a
bid of any kind on an auction if the auction is
closed.”
The following guidelines have been found to be useful when
producing use case requirements:
- Because use case paths involve multiple interactions and
postconditions, individual use case path requirements are too
general to be specifically testable without being further
refined at the use case path level.
- Use case path requirements should always include:
- The external that benefits from the proper execution of
the use case.
- The preconditions required to go down that path.
- See additional
use case path guidelines.