What is Use Case Testing and How to Prepare a Test Case for Testing?
In the phases and life cycle of software development, use case plays an important role. The entire process depends on the actions of the user and the response by the system to the actions. Hence it can be seen as documentation of the actions which is performed by the user or actor and then the corresponding interaction by the system to those actions. Not all the use cases result in achieving the goal by a user to the interactions with the system.
In a use case, the system responds to the situation or behavior. It is user-oriented rather than system-oriented. That is, they are actions that are done by the actor/user and not the output produced by the system. Hence the development team writes the ‘use cases’ as this phase depends on them. The writer of use cases, a team of development, customers, all of them together contribute towards the creation of use cases and testing.
What is Use Case Document?
Use case documentation helps to complete an overview of all the several ways in which the user interacts with the system to achieve the desired objective. The documentation will help to check the requirements for the software system and what is lacking in this process.
Who will use the Use Case Document?
As the documentation helps to get an overview of ways in which users can interact with the system, better documentation is always required for easier results. This documentation will be useful to the software developers and software testers along with the stakeholders.
There are several types of uses for these documents. It helps developers to implement the code and design the same. Further, testers use them to create test cases. Business stakeholders, on other hand, use the documentation in order to understand how the software works and their respective requirements.
Elements in Use Case Testing
The major elements of the use cases are brief introductions which help to explain the case.
- Actor, that is, the users which are involved in use case actions.
- Precondition, which is the conditions that need to be satisfied before the case begins.
- Basic Flow, or the main scenario which is a normal workflow in the system. In other words, this is a flow of transactions done by actors to accomplish their goals.
- Alternate flow, which is a less common interaction done by an actor with a system
- Exception flow, which prevents a user from achieving the goal
- Postconditions that are required to be checked after the case is finished.
How to Prepare Test cases?
It is best if the test cases for the main scenario are written first and then written second for alternate steps. These steps in test cases are from use case documents. Cases are supposed to be required as steps and the user or actor must be able to enter the same. Test design techniques can be used and developed to help reduce the number of test cases which can help reduce the time taken for testing.
Writing test cases and testing is an iterative process. Practice and knowledge of domain and system are required in this case. Using case testing in applications can be used to find missing links and incomplete requirements. Finding and modifying the same will bring efficiency and accuracy into the system domain.