Wednesday, 18 January 2017

Testing_116 : Test Case Design Techniques

A test design technique is basically a process for selecting test cases. It helps us to select a good set of test from the total number of all possible tests for a given system.
  • Equivalence Class Partitioning (ECP)
  • Boundary Value Analysis (BVA)
Equivalence Class Partitioning (ECP) :-
  • Equivalence partitioning is a method for deriving test cases.
  • In this method, classes of input conditions called equivalence classes are identified such that each member of the class causes the same kind of processing & output to occur.
  • Equivalence partitioning drastically cuts down the number of test cases required to test a system reasonably.
A technique that divides the input domain of a program into classes of data from which test cases can be divided.
  1. for each piece of the specification, generate one or more equivalence classes.
  2. Label the classes as "valid" and "invalid".
  3. Generate test cases that cover as many possible valid & invalid equivalence classes.
Boundary Value Analysis (BVA) :-

Boundary value analysis (BVA) is used to test the values that exist on the boundaries of ordered equivalence partitions.

A technique in which the test cases that explore the boundary condition have a higher probability of detecting error.
  • Verify the faults at near boundaries.
  • Good place to look for faults.
  • Test values on both sides of boundaries.
Formula :-

    Minimum, Maximum, Minimum-1, Maximum+1

 Valid boundaries   = Min, Max
Invalid boundaries = Min-1, Max+1

Example : Write test cases with the help of ECP and BVA of Textbox labeled Name?
Conditions :
  • Field is mandatory.
  • Between 5 to 30 alphabets.

ECP
BVA
Valid
Invalid
Valid
Invalid
5 to 30 alphabets
<5
Min = 5
Min-1 = 4
>30
Max = 30
Max+1 = 31
Blank space
Other than alphabets (numeric, characters etc.)

No. of test cases can be designed :
  1. Enter 5 alphabets.
  2. Enter 30 alphabets.
  3. Enter 4 alphabets.
  4. Enter 31 alphabets.
  5. Leave field blank.
  6. Enter other than alphabets(numeric, characters).
More Examples,
  • Contact :
 
ECP
BVA
Valid
Invalid
Valid
Invalid
10 digits
<10
Min = 10
Min-1 = 9

>10
Max = 10
Max+1 = 11

Blank space



Other than numeric (alphabets, characters etc.)




No. of test cases can be designed :
  1. Enter 10 digits.
  2. Enter 9 digits.
  3. Enter 11 digits.
  4. Start with "0" number.
  5. Field leave blank.
  6. Enter other than numeric(alphabets, characters).
  • Email :
ECP
BVA
Valid
Invalid
Valid
Invalid
Upto 30 characters
<5 char.
Min = 5
Min-1 = 4
Valid format : char@char.char
>31 char.
Max = 30
Max+1 = 31

Blank space



Invalid format




No. of test cases can be designed :
  1. Enter 5 char. with valid format.
  2. Enter 30 char. with valid format.
  3. Enter 5 char. with invalid format.
  4. Enter 30 char with invalid format.
  5. Enter 4 characters.
  6. Enter 31 characters.
  7. Leave field blank.

No comments:

Post a Comment