Use Case Testing Technique

Use Case Testing Technique in SDLC

In this article, I am going to discuss Use Case Testing Technique in SDLC. Please read our previous article where we discussed State Transition Testing. At the end of this article, you will understand the following important pointers which are related to Use Case Testing Technique in SDLC.

  1. What is a Use Case?
  2. What Should You Include in Your Project Requirements Use Case?
  3. Who Creates the Use Cases?
  4. How do Programmers Create Use Cases?
  5. What is Use Case Testing in SDLC?
  6. Types of Use Case Testing in SDLC
  7. What are the Characteristics of Use Case Testing?
  8. Feature of Use Case Testing
  9. What are the Advantages of Use Case Testing?
  10. What are the Disadvantages of Use Case Testing?
  11. Difference between Use case and Test case
  12. What is a Use Case?

An illustration of how a user interacts with a system or product is called a “use case”. Instead of being system-driven, it is user-driven. It outlines the success and failure situations as well as any important variations or exceptions that must be handled. With the aid of a use case model, it can be written on paper or rendered as a visual. A use case accomplishes the following:

  • Oversees Project-Related Scope Requirements.
  • Aids in defining the criteria.
  • Demonstrates the various methods in which a user can engage with the system.
  • Presents the system architecture visually.
  • Aids in evaluating system dependencies and associated hazards.
  • Simply explains difficult technical requirements to the appropriate stakeholders.

To bridge the gap between business and technical needs and to effectively explain the strategy to stakeholders, project managers must be fully conversant with all pertinent information on relevant use cases.

What Should You Include in Your Project Requirements Use Case?

For your project documentation, a use case may be useful information. Depending on whom the use cases are meant for, they can be expanded. The essential elements of a use case are as follows:

  • Brief Description: Briefly explain the overall use case in this description.
  • Prerequisite: The user must meet these prerequisites before the use case can start.
  • System: A system might be a thing to think about, such as a software program, service, or product.
  • Actors: Users who can engage with the system and display the proper behavior are called actors. The actor could be a piece of hardware, a different system, or a whole company. In a use-case situation, we can have a major actor and a secondary actor. While a secondary actor can give the system the necessary services, a primary actor can aid in starting contact with the system.
  • Basic Flow or Main Scenario: A use case instance is a particular series of operations and interactions between the actors and the system. This is a typical workflow that enables an actor to provide the desired results.
  • Alternate Flow: A system may have a different workflow from the standard one.
  • Exception Flow: The flow that prohibits the user from reaching the desired result is an exception flow.
  • Post-Conditions: Following the use case’s execution, the post-conditions must be verified.
Who Creates the Use Cases?

The client provides the customer requirement specification for the application, then the development team will write the use case according to the CRS, and the use case is sent to the customer for their review.

  1. The customer requirement specification (CRS) for the application is given by the client.
  2. The use case will be written by the development team using the CRS.
  3. The customer looks over the use cases.
  4. The development team moves on to the design and coding phase if the client approves the use cases.
  5. The testing team is also handed over approved use cases so they can begin creating test cases.

For a better understanding, please have a look at the following diagram.

Use Case Testing Technique in SDLC

How do Programmers Create Use Cases?

To make a use case that is simple for everyone to understand, developers employ standard symbols. To construct the use cases, they will employ the Unified modeling language (UML). The writing of a use case can be aided by a number of tools, including Rational Rose. To construct a use case, we must drag and drop the predefined UML symbols from this tool. The developer may also utilize these symbols to develop the use case.

What is Use Case Testing in SDLC?

Black box testing techniques like use case testing help identify test cases that are integrated into the system as a whole, transaction by transaction from start to finish. Functional testing is carried out to identify flaws in a developed system. Finding software application gaps that might have gone unnoticed during component testing is crucial. Through end-to-end testing techniques, use case testing allows you to assess software quality. The use case testing approach focuses on evaluating a system’s functioning based on its intended usage scenarios during black box testing. To make sure the system satisfies the requirements, this technique entails creating test cases that simulate common user interactions or business activities.

The use case testing approach focuses on evaluating a system’s functioning based on its intended usage scenarios during black box testing. To make sure the system satisfies the requirements, this technique entails creating test cases that simulate common user interactions or business activities.

Types of Use Case Testing in SDLC

There are 2 types. They are:

  1. Sunny day
  2. Rainy day

Sunny Day Use Cases: These are the primary cases that are most likely to happen when everything does well. These are given high priority than the other cases. Once we have completed the cases, we give them to the project team for review and ensure that we have covered all the required cases.

Rainy Day Use Cases: These can be defined as the list of edge cases. The priority of such cases will come after the ‘Sunny Use Cases’. We can seek the help of Stakeholders and product managers to prioritize the cases.

What are the Characteristics of Use Case Testing?

The use case testing features are listed below:

  • Use Cases document the interactions between ‘actors’ and the system.
  • The term “Actors” refers to users and the interactions in which each user engages.
  • Scenarios are test cases that are based on use cases.
  • The ability to find systemic flaws that isolation testing of specific components might miss.
  • Very good at defining the parameters of acceptance tests.
An example of Use Case Testing

In a use-case, a system is symbolized by “S” and an actor by “A”. The web application’s login feature is created by us and is demonstrated below.

Main Success Scenario Step Description
A: Actor

S: System

1

2

3

A: Enter Agent Name and Password

S: Validate Password

S: Allow account access

Extensions 2a

 

2b

Password not valid

S: Display Message and 4 times request a retry.

Password not valid 4 times

S: Close Application

  • Think about the initial stage of an end-to-end scenario for our online application’s login capability, when the Actor enters their email and password.
  • Following that, the system will check the password.
  • Next, access will be given if the password is accurate.
  • This use case may be expanded upon. The system will display a notification and request a four-time retry if the password is invalid.
  • The system will prohibit the IP address if the password is invalid four times.
Feature of Use Case Testing

Below are the features of the use case testing:

  • Use case testing is not testing that is performed to decide the quality of the software.
  • Although it is a type of end-to-end testing, it won’t ensure the entire coverage of the user application.
  • Use case testing will find out the defects in integration testing.
  • It is very effective in identifying the gaps in the software that won’t be identified by testing individual components in isolation.
What are the Advantages of Use Case Testing?

Use case testing in black box testing offers several advantages, including:

  1. Coverage: By concentrating on plausible scenarios that users are likely to experience, it ensures thorough coverage of the system’s functionality.
  2. User Perspective: It places a focus on comprehending the system from the user’s perspective, improving usability and user experience.
  3. Requirement Validation: It assists in confirming that the system complies with the required specifications and meets the demands of the intended users.
  4. Error Detection: Error detection analyses how the system responds to various use cases and interactions to reveal errors or inconsistent behavior.
  5. Prioritization: By identifying essential use cases that have a major impact on the functionality of the system, it helps to prioritize testing efforts.
What are the Disadvantages of Use Case Testing?

Use case testing in black box testing has some drawbacks, such as:

  1. Limited Coverage: Use case testing frequently concentrates on particular paths or scenarios, which may cause it to miss other potential problems or input combinations.
  2. Uncompleted Requirements: Testing may overlook critical functionality or edge cases if the use cases are not exhaustive or clearly described.
  3. Repetition: Use cases could overlap or have similar actions, which would require more testing and take up time.
  4. Lack of Integration: Because use case testing focuses on specific functionality rather than the relationships between various systems or components, integration problems may go unnoticed.
  5. Limited Scalability: In sophisticated or large-scale systems where various use cases and interactions must be taken into account, use case testing may not be able to handle the situation well.
Difference between Use case and Test case

Let us try and understand the difference between the use case and the test case:

Use Case Testing Technique in SDLC

In the next article, I am going to discuss Functional Testing. Here, in this article, I try to explain Use Case Testing Technique in SDLC. I hope you enjoy this Use Case Testing Technique in the SDLC article.

Leave a Reply

Your email address will not be published. Required fields are marked *