Use case testing is carried to identify the test cases with the use cases as test basis. The use cases are prepared by the Business Analyst (BA) to describe the interactions between the software items. The software functions are described using the use cases. The use case describes the process flow through the system based on its most likely in use. This makes the test cases derived from use cases good to particularly find the defects in the real world system.
A use case description is associated with different software items like end users, hardware components or any other system. All these system items are termed as Actors. Each use case describes the interactions of an actor with the system in order to achieve some specific goals. A use case can include: actors, system, interactions, preconditions, post conditions. The interactions can be represented using work flow diagrams, activity diagrams and business process models. Use cases can describe the normal behaviour, exceptional behaviour and error handling conditions.
Consider an example for flight reservation:
Actors: Customer attempting a flight reservation
System: train reservation system
In the login functionality of the flight reservation application form, where the Customer enters the agent name and password to login.
The flight reservation system will verify the password and account. If the account is active and user credentials are valid, Customer is allowed to login and menu options are displayed.
Here there could be an extension of the use case as the password is not valid the system may give the message and ask for retyping.
Or if the password is not correct for four or five times the application may close.
The Customer(actor) selects the book ticket option. The reservation system displays the page to enter travel details.
The Customer searches for available flights, selects the flight, enters travel details and proceed to payment. The payment options are provided by system. The customer completes the payment. System generates the travel itinerary. User logs out.