Test Case Design Technique in Software Testing With Examples
What is Test Case Design Technique??
Test Case Design techniques help us to identify whether the right input is
selected or not.
In this tutorial, we will
learn three important test case design techniques:
- Error Guessing
- Equivalence Partitioning
- Boundary Value Analysis
In Error Guessing, we design the test cases by selecting inputs such
that when these inputs are given to the application, the application
should through error.
Example of Error Guessing :
Let us Assume there this an amount field in an application and the amount
field should accept minimum value as 200 and the maximum value as
50,000.
So Using error guessing we will design test cases like:
- When Value less than 200 is entered in the amount field then the application should through an error.
- When Value Greater than 50,000 is entered in the amount field then the application should through and error.
- When the decimal value(200.33) is entered in the amount field then the application should through an error.
- When Value is entered as $50 in the amount field then the application should through and error.
In Equivalence partitioning, We divide the input
data of the software into a partition of equivalent data from which the
test cases can be designed.
Type 1: If the input is a range of value between A to B then
design the test case by selecting one valid input and two invalid
input.
Example: Suppose there is a password field which accepts 5 to 12
character so we will select one valid value as 6 and two invalid value as
4 and 13.
Type 2: When the input is a set of values then, we have to design the test case
by selecting one valid value that belongs to set and one invalid value
that does not belong to the set.
Example: There is a set of values such as {120,130,140,150} then while
designing test cases we will select one valid value 120 which belongs to
set and one invalid 170 that does not belong to set.
Type 3: When the input is the boolean value then we select the test
case for both true and false conditions.
Example: Radio button, CheckBox.
Boundary Value Analysis :
If the input is a range of between A to B then design the test case by
selecting the value such as A, A+1, A-1 and B, B+1, B-1.
Example: There is an amount field which should accept amount greater than
equal to 200 and amount less than equal to 50,000 so in this case, we will
select input as {200,199,201} and {50,000,50,001,49,999}
Conclusion:
- Test case design technique allows you to design better test cases
Comments
Post a Comment