How does Use Case Testing Inspect User-Software Interaction?

What is use case testing? To begin with, use case is a tool which helps in defining the user interaction. Imagine a case where you are trying to create a new user registration or make changes to existing user application.

Several interactions in this step are possible and in this process, you need to think how to represent the requirements for the solution. Business developing experts here has understanding about requirement. In order to reduce miscommunications in the process and structure the communication, use case comes into the scenario.
This article will help to understand the concept of use case testing through getting to know the aspects involved in the process.
Use Case 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 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 are result in achieving the goal by user to the interactions with system.
In use case, the system responds to the situation or behavior. It is user-oriented rather than system oriented. That is, they are actions which 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, team of development, customers, all of them together contribute towards the creation of use cases and testing.
The development team will assemble the cases as they are aware and highly are knowledgeable about the concepts. Once the case is implemented and document is tested, the behavior of the system is checked as required.
‘Use Case’ documents: What are they?
Use case documentation helps to gather complete overview of all the several ways in which the user interacts with system to achieve the desired objective. The documentation will help to check the requirements for the software system and what are lacking in this process.

Also Read: Agile Testing – An effective Software Testing Methodology

Who uses ‘Use Case’ documents?
As the documentation helps to get an overview of ways in which user can interact with the system, a 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 to these documents. It helps developers to implement the code and design the same. Further, testers use them to create test cases. Business stake holders, on other hand, use the documentation in order to understand how the software works and their respective requirements.
Types of Use Cases
There are two types of use cases, namely, sunny day and rainy day.
Sunny day use cases: They are cases which happen when everything goes well. They are high priority use cases than others and once these are completed, we can give these to the team for undertaking a review in order to ensure that all that is required is covered in these cases.

Rainy day use cases: These can be defined as edge cases. These cases are next to important after sunny use cases. Stakeholders and product manages can help at later stage to prioritize these cases
Elements in Use Cases
The major elements of the use cases are
Brief Introduction which helps to explain the case
Actor, that is, the users which are involved in use case actions
Precondition, which is the conditions need to be satisfied before the case begins
Basic Flow, or the main scenario which is normal workflow in the system. In other words, this is flow of transactions done by actors to accomplish their goals.
Alternate flow, which is less common interaction done by actor with system
Exception flow, which prevents a user from achieving the goal
Post conditions which are required to be checked after the case is finished.
Use case testing: What is it?
The use case testing comes under functional black box testing technique. Since it is black box testing, there won’t be inspection of codes. The testing ensures that the path of user is working as required and if it can accomplish the task successfully.
Use case testing is not a type of testing which is performed to understand or assess the quality of a software. It won’t ensure that the entire application is covered. Further, based on the test result, we cannot decide the production environment.
Use case testing helps finding out defects in integration testing. It is a technique in which we can identify the test cases on basis of transactions from start to finish.
Imagine a situation where a user is buying something from online shopping website. User is first required to log in to the system and perform a search action. The user then selects items in results and will add the required in the cart.

Also Read: Code Refactoring: Why Is It Crucial For Software Testers

After this process, user is supposed to check out. This is an example how the steps are connected in the series logically where the user is performing a task in the system to accomplish his goal. These are the flow of transactions in the system from end to end is tested in the use case testing. This testing is generally a path which users are likely to use for achieving a task.
Hence the first step in testing is to review the use case documents and make sure that the functional requirements are correct and finished. Second step is to make sure that the use cases are atomic. It is further required to inspect the workflow in the system and if it is continuous. Based on knowledge of the system or domain, once the workflow is inspected and ensured right, missing steps are to be found in the work flow.
After this step, it is required to ensure again that the alternate workflow of system is complete. Testing team should make sure that the each step of use case is testable. Test cases should be written in all the situations for normal and alternate flow.
Writing Use Case Testing
It is best if the test cases for main scenario is written first and then write the second for alternate steps. These steps in test cases are from use case documents. Cases are supposed to be required as steps and user or actor must be able to enter the same. Test design techniques can be used and developed to help reducing the number of test cases which can help reducing the time taken for testing.
Writing test cases and testing is iterative process. Practice and knowledge of domain and system is required in this case. Use case testing in application can be used to find missing links and incomplete requirements. Finding and modifying the same will bring in efficiency and accuracy in to the system domain.