There are few Test Design Techniques followed which would help to write better and optimized test cases. They are as given below.
List of Test Design Techniques
- Equivalence Partition:
Software testers will use this method when there is the huge range of input possibilities for a certain field in the system. Consider the below-given example to understand it better.
Let’s say there is a text box on a web page which should accept values between 1- 1000.
Now we cannot write 1000 test cases for each number and test them all, and the same method is not logical also as we may be repeating the same scenario for same kind of input data many times. In equivalence partition method we divide the range of input numbers into equal partitions. Each partition will have the data set of similar range.
In our example, we will split the data range as 1-9, 10-99 and 100-999.
Now we have to write only 3 test cases for input validation. one test case will be with input data as any number between 1-9, the Second test case will be with input data as any number between 10-99 and third test case will be with input data as any number between 100-999. The test cases what we have written for the range within the valid range is called valid state.
Now we need to test for the invalid data range or invalid state also. Invalid state for our example will be any number below number 1 and any number above number 1000. As we can see here instead of writing 1000 odd test cases we are writing the maximum of 6 test cases to get the same testing results.
- Boundary Value Analysis:
Boundary value analysis again a test case writing methodology where we check for the boundary values of a certain input range.
Ex: Let’s assume a text box in a field is supposed to accept number only between 1-10. Now as the term indicates we will take the boundary values of our range as 0,1 and 10,11. Our input box should accept the values for 1 and 10 and reject for 0 and 11.
- Risk Based Testing:
In this approach, Modules or the sections of the software are identified based on the risk involved in the failures of the functionalities and prioritized.
All these are Test design techniques as well as test case optimization techniques. By following these techniques we can achieve better results, better coverage with less no of test cases.