Test Case Design Techniques
Test case design is a crucial aspect of software testing that involves creating a set of specific test cases or test scenarios to verify the functionality and quality of a software application. There are various techniques and approaches for test case design, each with its own strengths and weaknesses.
Test Case Design Techniques are systematic approaches used to create test cases for software or system testing. These techniques aim to ensure that the software or system functions as expected, meets requirements, and doesn’t contain defects. Using these techniques can increase the chances of finding defects and ensure better coverage of the system being tested.
Test case design techniques can be broadly classified into three categories:
- White-box Testing Techniques (or Structural Testing Techniques):
Statement Coverage: Every statement in the code should be executed at least once.
Branch/Decision Coverage: Every branch (both true and false conditions) should be executed at least once.
Path Coverage: Every possible path through the code should be executed.
Condition Coverage: Every individual condition in a decision should be tested as both true and false.
Loop Testing: Focuses on the validity of loop constructs in the software.
- Black-box Testing Techniques (or Functional Testing Techniques):
Equivalence Partitioning (EP): The input domain is divided into classes of equivalent data from which test cases can be derived.
Boundary Value Analysis (BVA): Test cases are designed based on boundary values.
Decision Table Testing: Uses a table to represent combinations of inputs.
State Transition Testing: Test cases are designed based on the states a system can adopt and transitions between those states.
Use Case Testing: Test cases are derived from use cases.
- Experience-based Techniques:
Error Guessing: Based on the experience of the tester, this technique guesses the problematic areas of the application.
Exploratory Testing: Involves exploring the application and identifying defects without any pre-defined test cases or plans.
Ad-hoc Testing: Similar to exploratory testing but without any specific test design techniques in mind.
For Free, Demo classes Call: 020-71177008
Registration Link: Software Testing Training in Pune!
Steps in Test Case Design:
- Understand the requirements: Before designing any test case, it’s crucial to thoroughly understand the requirements or user stories.
- Choose an appropriate test design technique: Depending on the context, one might choose structural techniques, functional techniques, or even experience-based techniques.
- Design test cases: Depending on the chosen technique, design test cases to achieve desired coverage.
- Review and refine: Review the test cases, refine as necessary, and ensure they meet the objective.
- Execute test cases: Run the test cases against the application or system under test.
- Document results: Log the outcomes of the test cases, whether they passed or failed, and any defects discovered.
Here are some common test case design techniques:
- Equivalence Partitioning:
- In this technique, the input domain of the software is divided into different equivalence classes, where each class represents a group of inputs that should behave similarly.
- Test cases are then designed to cover at least one representative from each equivalence class.
- This technique helps in reducing the number of test cases while still providing good coverage.
Percentage **Accept percentage only between 50-90
Equivalence Partitioning | ||
Invalid | Valid | Invalid |
<=49 | 50-90 | >=91 |
For Free, Demo classes Call: 020-71177008
Registration Link: Click Here!
- Boundary Value Analysis (BVA):
- BVA focuses on testing values at the boundaries of input ranges and data structures.
- Test cases are designed to include inputs at the lower and upper boundaries, as well as just inside and just outside those boundaries.
- BVA helps identify issues related to boundary conditions, which are often error-prone.
- Decision Table Testing:
- Decision tables are used to model complex business rules or logic with multiple inputs and conditions.
- Test cases are designed to cover all possible combinations of inputs and conditions, ensuring comprehensive coverage of decision logic.
T🡪True F🡪False
Username | T | T | F | F | ____ |
Password | T | F | T | F | _____ |
Expected results | Home Page | Incorrect password | Incorrect username | Incorrect username | Enter Username |
Decision making table on Login page
- State Transition Testing:
- This technique is used for systems with different states, such as finite state machines.
- Test cases are designed to transition the system from one state to another and verify the correctness of those transitions.
- It is particularly useful for testing the behavior of systems with state-dependent functionality.
State transition diagram with ATM PIN verification
For Free, Demo classes Call: 020-71177008
Registration Link: Click Here!
- Pairwise Testing:
- Pairwise testing, also known as all-pairs testing, is an optimization technique that aims to reduce the number of test cases while still achieving good coverage.
- It focuses on testing all possible combinations of two input parameters, as these often reveal the most defects.
- This technique is especially helpful when there are many input parameters, and exhaustive testing is impractical.
- Use Case Testing:
- Use cases are scenarios that describe how users interact with the software.
- Test cases are designed based on these use cases to validate that the software meets the intended user requirements.
- Use case testing ensures that the software functions as expected from a user’s perspective.
- Random Testing:
- In this technique, test cases are generated randomly or with minimal planning.
- It can help uncover unexpected defects but may not provide systematic coverage.
- Random testing is often used in combination with other more structured testing techniques.
- Ad Hoc Testing:
- Ad hoc testing involves creating test cases on the fly, often without formal documentation or planning.
- Testers use their intuition and domain knowledge to design test scenarios.
- While it can be useful for exploratory testing, it may not provide systematic coverage.
- Regression Testing:
- Regression testing focuses on retesting previously tested functionality to ensure that new code changes have not introduced defects.
- Test cases are designed based on the existing functionality and any changes made to the software.
Do watch our Short video on Software Testing
The choice of test case design technique depends on factors such as the project’s requirements, the complexity of the software, available resources, and the testing objectives. In practice, a combination of these techniques is often used to ensure comprehensive test coverage and effective defect detection.
Author:-
Chetna Malagi
Call the Trainer and Book your free demo Class For Software Testing Call now!!!
| SevenMentor Pvt Ltd.
© Copyright 2021 | SevenMentor Pvt Ltd.