Advanced Use Case Analysis
What is Use Case Analysis?
Use case analysis in software engineering is a process of collecting and describing the user requirements, in which they are transformed into actors and use cases. The goal is to identify roles, processes, and classes within a software system. It is usually used within the software development process. The use case analysis has its place in classical project approaches as well as in the agile development.
What is a Use Case?
A use case defines a goal that may be achieved by performing a series of actions over a system by a user role (known as an actor). An actor may represent a human or an external system.
Definition of Use Case
A completely defined use case has the following structure:
- Primary actor
- Minimal guarantees
- Success guarantees
- Frequency of use
- Flow of events
How to Perform Use Case Analysis?
You need to identify actors and use cases for the modeled system. Collect all user roles that can interact with the system. Think about all possible goals for the identified roles that should be met and write them down as use cases. The best way how to do it is to create a use case diagram. Add actors to the diagram one by one. Associate use cases to each actor. Some use cases may be a little bit complex or their parts may be reused by several other use cases. Identify and create such use cases and associate them with the complex use cases using include and extend associations.
An included use case represents a nested part of another use case. The use case is not complete without the included use case.
A use case can be extended by another use case. Extended use cases may exist even without their extensions. An extension is performed when a specific condition is met in a so-called extension point.
How to Create UML Use Case Diagram?
You may create a use case diagram very easily with use case tools provided by Software Ideas Modeler.
Create a new project and add a new use case diagram.
Click on the Actor button in the toolbox and drag it over the diagram editor canvas. Then set the name that describes the user role best. E.g. Accountant, Task Planner, Transaction Pool
Repeat these steps until you have added all the actors.
Select an actor and click on Add Use Case button in the context bar. Then set the name of the use case. The name should clearly describe what is the goal of this user interaction with the modeled system. E.g. Create an invoice, Plan a task, Register transaction
Add included use cases if there are any.
Add use case extension if there are any.
Specify details of the particular use cases. Enter the individual action or event steps for each use case.
Creating Use Cases
If you have identified the use cases, you may continue with other steps - add another level of details and enter the use case description and other parameters. To access the use case detail form, right-click on a use case and choose Show Definition.
Specify the primary actor of the use case. It is a human actor who initiates the interaction with the system. Then you should specify stakeholders (or supporting actors) which helps to fulfill the use case goal and react to the primary actor interaction.
Each use case has its scope. It may be one of these:
- Organization Black Box
- Organization White Box
- System Black Box
- System White Box
A level of details can be specified for a use case. If the steps are expressed only in an outline - you should set the Very High Summary level. If a use case mentions implementation details on a programming language level, you should set level as Too Low for such use case. Each use case can have another level of detail depending on its importance or required accuracy. There are these levels available:
- Very High Summary
- User Goal
- Too Low
Another use case attribute is the precondition. It says what condition should be met to be able to perform the given use case.
We can also specify what conditions should be met to fulfill the goal of the use case. Success guarantees define a condition to meet the primary actor goal. Minimal guarantees define a condition to meet the stakeholders' promises at least.
Triggers define actions or events that may invoke the use case.
You can also enter other additional details as the frequency of use or priority to better describe the importance of the use case.
You can track the state of use case analysis. A use case may be in one of these states:
Insert Events to Use Case Event Flow
We have defined the attributes of a use case. However, how to write use cases? How to define the flow of events and actions which describe the essence of a use case? In the Use Case editor, switch to the Flow tab. It offers several buttons that allow you to create the flow of events, insert the individual events, adjust their nesting, choose the way how they are numbered.
These actions are available:
- Insert Event Below
- Insert Event Above
- Insert Sub Event
- Indent Level
- Outdent Level
- Add Link
- Paste Flow Events
- Delete Event
The editor is optimized to work with a mouse as with a keyword.
These shortcut keys may be useful when working with the use case editor:
- CTRL+Enter - adds a new event
- CTRL+Plus - shows a context menu that allows you to choose between several options: Insert Event Below, Insert Event Above, and Insert Sub Event.
- Tab - increase the nesting of the current event
- SHIFT+Tab - decrease the nesting of the current event