Black Box
Black Box
Advantages
The designer and the tester are independent of each other.
The testing is done from the point of view of the user.
Test cases can be designed when requirements are clear.
Black Box Testing
Disadvantages
Test cases are difficult to design.
Testing every output against every input will take a long time and
many program structures can go unchecked.
Inefficient testing because tester only has limited knowledge about
an application.
White Box Testing
Is detailed examination of internal structure and logic of
code.
In white box testing, you create test cases by looking at the
code to detect any potential failure scenarios.
White box testing is also know as Glass Testing or Open box
testing.
White Box Testing
Advantages
As tester has knowledge of the source code it is easy to find
errors.
Due to testers knowledge of code , maximum coverage is
attained during test scenario.
He or she can then see if the program diverges from its intended
goal.
White Box Testing
Disadvantages
As skilled tester are performing tests, costs is increased.
As it is very difficult to look into every corner of the code, some
code will go unchecked.
Test Case and Test Data Generation
Black Box Testing
Equivalence Partitioning
A good test case is one that has a reasonable probability of
finding an error.
Keeping in view the fact that an exhaustive-input testing of
a program is impossible.
limited to trying a small subset of all possible inputs.
Of course, then, we want to select the right subset-the
subset with the highest probability of finding the most
errors.
Equivalence Class Partitioning
The input domain of a program is partitioned into a finite
number of equivalence classes such that we can reasonably
assume that a test of a representative value of each class
is equivalent to a test of any other value.
That is, if one test case in an equivalence class detects an
error, all other test cases in the equivalence class would be
expected to find the same error.
Conversely, if a test case did not detect an error, we would
expect that no other test cases in the equivalence class
would fall within another equivalence class, since
equivalence classes may overlap one another.
Equivalence Class Partitioning
Test Case 1 2 3
Invalid E.C.(s)
Course Mark < 0 ‘FM’
Course Mark > 100 ‘FM’
Valid E.C.(s)
0 ≤ Course Mark < 30 ‘D’
30 ≤ Course Mark < 50 ‘C’
50 ≤ Course Mark < 70 ‘B’
70 ≤ Course Mark ≤ 100 ‘A’
Test Case Generation (Using Black Box) and Test
Data Generation (Equivalence Class Partitioning)
Valid Partitions
TEST CASES 1 2 3
Test cases 4
Expected output FM
Test Case Generation (Using Black Box) and Test
Data Generation (Equivalence Class Partitioning)
Equivalence partitions may also be considered for
invalid outputs.
Difficult to identify unspecified outputs.
If test can cause to occur an Invalid output, i.e.
identified a defect in either the component, its
specification, or both.
Test Case Generation (Using Black Box) and Test
Data Generation (Equivalence Class Partitioning)
Valid Partitions
Test cases 5 6 7
Course Marks -20 17 45
Partition tested 0<C 0<=C<=30 30<=C<50
Valid Partitions
Test Case 8 9 10
Expected output B A FM
Minimal Test Cases
S4 Home Page
S5 Error Page