Use Case Testing is a functional black box testing technique. It helps testers to identify test scenarios to exercise the whole system on each transaction basis from start to finish (“End to end testing“). It makes sure that the user performs its function successfully, without any interruption or error. Use case testing is not performed to determine the quality of the software.
Important Properties :
- It provides the interactions between “actors” and the “system”.
- “Actors” serve as users and their interactions of each user takes part into the system.
- We can also refer “Use Case Testing” as Scenarios.
- It identifies gaps in the system which would not be found by testing individual components in isolation.
- Very effective in defining the scope of acceptance tests.
Documentation elements in a use case can be :
- Actor: It is a user entity that is involved in use case actions.
- Brief description: It is a description that explains the use case in brief.
- Precondition: It is a condition that needs to be satisfied before the use case starts.
- Basic Flow: It is a flow of transaction that is done by the user while interacting with the system or software. As it is a normal workflow, there will be no chances of getting an error from the system. The actor or user will get the expected result from the system.
- Alternate Flow: A system can also have alternate flow. This is a less common interaction done by the user towards the system.
- Exception Flow: It is a flow that prevents and user to achieve its goal and throw some error.
- Post Condition: It is a condition that needs to be checked after the use case.
use case Diagram elements :
It is shown by using a rectangle shape.
It is shown by using an oval shape. Any action or activity which is carried is shown by using the use case.
Actor (without smiling face and happy rising hands – hands are on the sides- 🙂
The actor is an entity that is used to represent the user.
Indicator of Relationship
Relationship is used to show the flow of the action. It is represented by using an arrow.
Exmple test case :
- Consider the first step of an end to end scenario for a login functionality for our web application where the Actor enters email and password. This is a very clasic senario on any softwares / apps these days.
- In the next step, the system will validate the password
- Next, if the password is correct, the access will be granted
- There can be an extension of this use case. In case password is not valid system will display a message and ask for re-try four times
- If Password, not valid four times system will ban the IP address.
- Here we will test the success scenario and one case of each extension.
Exmple test Diagram :
Related Glossary (Source: ISTQB Glossary "glossary.istqb.org") -> # Transactional analysis : The analysis of transactions between people and within people's minds; a transaction is defined as a stimulus plus a response. Transactions take place between people and between the ego states (personality segments) within one person's mind. # Black-box test technique : A test technique based on an analysis of the specification of a component or system. Synonyms: specification-based test technique, black-box test design technique # Acceptance testing : A test level that focuses on determining whether to accept the system. # End to end testing : A type of testing in which business processes are tested from start to finish under production-like circumstances. Synonyms: E2E testing