A use case is a description of a particular use of the system by an actor. Each use case describes the interactions the actor has with the system in order to achieve a specific task.
“The Use-Case Testing Technique helps to identify test cases that cover the entire system, on a transaction by transaction basis from the start to finish“.
The use case is the sequence of steps that describe the interactions between the actor and the system.
Use case testing used for developing test cases mostly at the system and acceptance testing levels.
For Example :
Take the ATM transaction example. We show successful and unsuccessful scenarios. In the picture, we can see the interactions between the A (actor) and S (system). From step 1 to step 5 that is success scenario it shows that the card and pin both got validated and allows Actor to access the account. But in extensions, there can be three other cases that are 2a, 4a, 4b which is shown in the picture below.
Use case testing focuses on the realistic data while doing the transaction. We can use all the dynamic testing techniques to test the correct flows and the alternate flows. Use case testing should be used as a guideline for generating more detailed level testing.
Use case test cases are also supported by the preconditions which should be satisfied while executing the test case. Since it is based on the user/business view and realistic data, these preconditions forms an integral part of the execution. Once the test case is executed, post condition can also be defined which defines the final state of the application.