Use case and use case testing are commonly used in software testing, but what do these two terms stand for and why should a software development team use them? Here are the key things to know about use cases and use case testing.
Definition of Use Case
Use case testing is a software testing technique that helps identify the test cases that encompass the entire system on an action-to-action basis. In other words, use case testing helps map out the customer journey within the product.
A use case, in turn, is a collection of steps needed to complete the desired action from start to finish with maximum efficiency. In use case testing, the users are called actors, and the components of the system are called subjects.
Oftentimes, the use case will also have extensions — in case one of the steps doesn’t go according to the plan. For example, when a user’s credit card is declined during an online transaction, the website or the app will save the contents of the cart and suggest the user chooses an alternative payment method.
Here is an example of a use case for a sign-up and login form on a site:
- The actor enters an email address.
- The system recognizes the address.
- The password field appears.
- The actor enters the password and clicks “Enter”.
- Login is successful.
- The system does not recognize the address.
- The password and name fields appear.
- The actor enters the name and the password and clicks “Sign up”.
- Registration is successful.
Types of use cases
There are two types of use cases known in the software testing industry. The differentiation of use cases is based on the projected outcome. There are primary use cases and edge use cases. Here is what they actually mean:
- Primary use cases, also known as basic use cases or sunny day use cases, deal with situations when nothing goes wrong throughout the whole interaction between the actor and the subject.
- Edge use cases, also known as rainy day use cases or simply exceptions, serve to predict and resolve variations from the primary use case. In other words, an edge use case deals with a customer journey that differs from the norm.
Who writes use cases?
Ideally, a use case needs to be written by a person or a team who is the most knowledgeable about the functionality and system requirements of the software product. Traditionally, use cases are created by business analysts, who directly deal with designing the features of the software solution. However, the development team behind the app can also contribute to the use cases.
Benefits of use case testing
Use case testing should be present whenever the product is intended for use by an audience. The key benefits of use case testing include:
- Use case testing is one of the few types of software testing that focuses on the user, not the system. Seeing the system through the eyes of the end user can give some valuable insights to the development team.
- Use case testing helps identify the functional aspects of the product that are unnecessarily complicated for the end user. It also helps pave the way for effective functional testing after the product is finished.
- Use case testing is one of the first types of testing you can perform on a software product. In fact, the use case testing phase can be started even before the active development stage, so the development team will be able to quickly implement the necessary changes.