What are Use Cases

From Requirements Management School

Definition

“Use cases” can be defined as:


Interactions between the software system being developed and various user classes.

Each use case is a usage scenario that describes an individual activity or task. This means that each use case can usually be performed in isolation to achieve a single goal.

Detailed Description

Use cases are a very important part of the requirements process. They form an integral component of the requirement specification, validation and modeling processes.

Each use case has a set of preconditions that have to be met before the scenario can be acted out. There are then a series of steps that are carried in order to achieve the goal laid down. Carrying out the steps results in a set of post-conditions i.e. the state that the system must be in after all actions are taken.

There may be variations associated with a use case. This is because when carrying out a process user may not always carry out exactly the same steps to achieve user's goal. For example, additional steps might be required or there may be cases where certain steps do not have to be completed. These variations must be documented in order for all requirements to be captured. these are usually called "Extensions".

There are conditions in most scenarios that will prevent a task from being successfully completed. These are known as "Exceptions". Use cases must also capture any exceptions that can occur. If all of these avenues are not explored in the use cases then there is a danger that required functionality would be missed.

Contents of a Use Case

Different organizations use different templates for use cases. But best practice suggests that the following items must be included and written in business terminology:

  • The name of the use case and a unique identifier – convention states that the name should describe the achievable goal. This is done by using a verb followed by the object. For example “Update Address Field”.
  • The goal – a short description that identifies what the goal to be achieved is.
  • Business rules – a clear description of any business rules that must apply to the use case.
  • Preconditions – a listing of the conditions that need to be met before the use case can be actioned.
  • The scenario – also known as the basic course of events. This is a list of steps that the user needs to be take in order for the goal to be achieved.
  • Alternate paths (aka Extensions) and exceptions – other variations that will also lead to the goal being achieved or failing.
  • Post-conditions – these should list the conditions that the system and process will be in once the use case has been actioned.

Rigorously capturing the business process in this way from users will mitigate the possibility of requirements falling through the gaps. They should also provide all alternate scenarios and exceptions that should help developers avoid the pitfall of guessing what should happen if the task does not complete successfully.

Thus, use cases are a key communication tool that helps to ensure that all stakeholders fully understand the functionality of the system that is going to be delivered.