Use Case basics
In our tutorials series on business analysis fundamentals, we are starting with use case basics. Use case diagrams are central to use case modelling. Use cases are one of the easiest ways to capture the requirements.
This series is going to cover basics of many business analysis skills like user stories, sequence diagrams, activity diagrams and many more. The purpose of publishing this business analysis fundamentals tutorials series to provide basic understanding on business analysis skills for everyone, who are new to these concepts.
What is a use case?
Use case is a pictorial notation to represent high level requirements from a user perspective. Use case diagrams comprise of 3 elements – the actor, use case and association link. A typical use case is represented as shown below:
Use case diagrams, however, can represent very limited information. So, we create use case specifications document to add more detailed information. Later in this tutorial, we are going to look at the format of the use case specification document as well.
Who is an actor in use case diagrams
An actor is an external entity who is likely to interact with the proposed software system. The actor is always outside entity like a user, another system, administrator, finance manager etc. Any entity in the system like a database, can not be an actor. An actor is represented as shown below:
Use case in use case diagrams
An oval shape represents a use case in use case diagrams. A use case represents an interaction or a functionality of the system. The notation for a use case is as shown below:
use cases Example
Let’s look at a section of a requirements document and identify the use cases:
A user has to login into the system to book the flight tickets. Logged in users will also have the facility to use discount coupon codes to avail discounts. The users can search for the flights on any domestic route and for any day. However, they can’t do it for the same day.
How to identify use cases?
In the above case, we can look for sections representing interaction points. Easiest way to look for them is to look for action verbs. I have marked these use cases with underlines as shown below:
A user has to login into the system to book the flight tickets. Logged in users will also have the facility to use discount coupon codes to avail discounts. The users can search for the flights on any domestic route and for any day.
The use cases are:
- Login into the system
- Book flight tickets
- Use discount codes
- Avail discounts
- Search for the flights
The use case diagram for the above example is as shown below:
Use case diagram is central to the use case modelling. All the other diagrams like activity diagrams, sequence diagrams, state model diagrams are created using the use case diagram.
You can also notice that, I have not created the use case for “Avail discounts”. Avail discounts is a actually a result of “enter discount coupons”. The discounts is applied to the total bill amount and in that case, it is just a calculated field, which needs to be tested. It’s possible to have these cases which represent an action but may not be an interaction. In these cases, these are not candidates for being use cases.
Use case specifications
Use case specifications are an integral part of every use case diagrams. The specifications add important details to the use case diagrams. These details are:
The scenarios describe the positive and negative workflows related to each use case. We are going to discuss the same in later posts.
I am also posting a small video recorded in the ECBA business analyst training sessions.