Software Test Design Techniques
Test design techniques helps to design better cases. It Reduce the number of test cases to be executed.
- Equivalence Class Partitioning
- Boundary Value Analysis (BVA)
- Decision Table based testing.
- State Transition
- Error Guessing
Partition data into various classes and we can select data according to class then test. It reduce the number of test-cases and saves time for testing.
Equivalence Class Partitioning Example 1:
Equivalence Classes:
Equivalence Class Age Range 1 18 to 25 2 26 to 35 3 36 to 45 4 46 to 60 5 Less than 18 6 Greater than 60
- Test with an age of 22 (Valid - Equivalence Class 1).
- Test with an age of 30 (Valid - Equivalence Class 2).
- Test with an age of 40 (Valid - Equivalence Class 3).
- Test with an age of 55 (Valid - Equivalence Class 4).
- Test with an age of 16 (Invalid - Equivalence Class 5).
- Test with an age of 65 (Invalid - Equivalence Class 6).
Equivalence Classes:
Equivalence Class Quantity Range 1 1 to 10 2 Less than 1 3 Greater than 10
This table represents the different equivalence classes based on valid and invalid quantity ranges.
- Test with a quantity of 5 (Valid - Equivalence Class 1).
- Test with a quantity of 1 (Valid - Equivalence Class 1).
- Test with a quantity of 10 (Valid - Equivalence Class 1).
- Test with a quantity of 0 (Invalid - Equivalence Class 2).
- Test with a quantity of 15 (Invalid - Equivalence Class 3).
Equivalence Class | Description |
|---|---|
1 | Valid Alphanumeric Username: Alphanumeric values that meet general username requirements. |
2 | Invalid Username: Any username that contains special characters. |
3 | Invalid Username: A username that consists of only blank spaces or is completely blank. |
This table represents the different equivalence classes based on valid and invalid criteria for usernames.
- Valid Alphanumeric Username:
- Username: "JohnDoe123" (Valid - Equivalence Class 1)
- Invalid Username with Special Characters:
- Username: "User@123" (Invalid - Equivalence Class 2)
- Invalid Username with Blank or Whitespace:
- Username: " " (Invalid - Equivalence Class 3)
- Valid Alphanumeric Username with Mixed Case:
- Username: "TechieUser456" (Valid - Equivalence Class 1)
- Invalid Username with Leading Whitespace:
- Username: " Geek123" (Invalid - Equivalence Class 3)
- Invalid Username with Trailing Whitespace:
- Username: "SmartCoder " (Invalid - Equivalence Class 3)
- Invalid Username with a Mix of Alphanumeric and Special Characters:
- Username: "Alpha@Numeric" (Invalid - Equivalence Class 2)
Test with the Minimum Valid Input:If the valid range is 1 to 100, test the program with the smallest valid input, which is 1. This helps ensure that the program handles the lowest allowed value correctly.Test with the Maximum Valid Input:Similarly, test with the largest valid input, which is 100. This ensures that the program works well with the highest allowed value.Test with Values Just Below the Valid Range:Check how the program behaves with values right below the valid range, like 0. This helps catch any issues with values slightly outside the allowed range.Test with Values Just Above the Valid Range:Test with values slightly above the valid range, such as 101. This helps identify if the program can handle inputs that are a bit higher than the maximum allowed.Test with Values Inside the Valid Range:Lastly, test with a regular value inside the valid range, like 50. This ensures that the program works properly with typical inputs.
- Decision Table is also called as Cause-Effect Table.
- This technique will be used if we have more conditions and corresponding actions.
- In Decision table technique, we deal with combinations of inputs.
- To identify the test cases with decision table, we consider conditions and actions.
Let's consider a simple decision table for determining whether a person is eligible for a discount based on their age and membership status:
| Condition 1 (Age) | Condition 2 (Membership) | Action |
|---|---|---|
| Below 18 | Any | No |
| 18 to 25 | Yes | Yes |
| 18 to 25 | No | No |
| 26 and above | Any | Yes |
In this example:
If the person is below 18, irrespective of their membership status, they are not eligible for a discount.If the person is between 18 and 25:If they have a membership, they are eligible for a discount.If they don't have a membership, they are not eligible for a discount.If the person is 26 or above, irrespective of their membership status, they are eligible for a discount.
- A person below 18 with a membership.
- A person between 18 and 25 without a membership.
- A person 26 or above with or without a membership.
Let's create a decision table for the online money transfer scenario based on the given conditions and actions:
| Condition: Account Approved | Condition: OTP Matched | Condition: Sufficient Money | Action: Transfer Money | Action: Insufficient Amount | Action: Block Transaction |
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | No | No |
| Yes | Yes | No | No | Yes | No |
| Yes | No | - | No | No | Yes |
| No | - | - | No | No | Yes |
- If the account is approved, OTP is matched, and there is sufficient money, the action is to transfer money.
- If the account is approved, OTP is matched, but there is insufficient money, the action is to show a message about insufficient amount.
- If the account is approved, but OTP is not matched, the action is to block the transaction.
- If the account is not approved, irrespective of OTP, the action is to block the transaction.
Account Approved: YesOTP Matched: YesSufficient Money: YesExpected Result: Money should be transferred.
Account Approved: YesOTP Matched: YesSufficient Money: NoExpected Result: Show a message about insufficient amount.
Account Approved: YesOTP Matched: NoExpected Result: Transaction should be blocked.
Account Approved: NoOTP Matched: Doesn't matterExpected Result: Transaction should be blocked.
- In State Transition technique changes in input conditions change the state of the Application.
- This testing technique allows the tester to test the behavior of an AUT.
- The tester can perform this action by entering various input conditions in a sequence.
- In State transition technique, the testing team provides positive as well as negative input test values for evaluating the system behavior.

|
Correct
PIN |
Incorrect
PIN |
|
|
S1) Start |
S5 |
S2 |
|
S2) 1st attempt |
S5 |
S3 |
|
S3) 2nd attempt |
S5 |
S4 |
|
S4) 3rd attempt |
S5 |
S6 |
|
S5)
Access Granted |
– |
– |
|
S6)
Account blocked |
– |
– |
Labels: effective test design., QA strategies, software testing methods, test case generation, test coverage, Test design techniques, test scenario creation

<< Home