Black Box Testing:
Black box testing attempts to derive sets of inputs that will fully exercise all the functional requirements of a system. It is not an alternative to white box testing. This type of testing attempts to find errors in the following categories:
1. Incorrect or missing functions,
2. Interface errors,
3. Errors in data structures or external database access,
4. Performance errors
5. Initialization and termination errors.
Tests are designed to answer the following questions:
1. how is the function's validity tested?
2. What classes of input will make good test cases?
3. Is the system particularly sensitive to certain input values?
4. How are the boundaries of a data class isolated?
5. What data rates and data volume can the system tolerate?
6. What effect will specific combinations of data have on system operation?
White box testing should be performed early in the testing process, while black box testing tends to be applied during later stages. Test cases should be derived which
· Reduce the number of additional test cases that must be designed to achieve reasonable testing
· Tell us something about the presence or absence of classes of errors, rather than an error associated only with the specific test at hand.
Testing Technique:
1. Equivalence Partitioning
This method divides the input domain of a program into classes of data from which test cases can be derived. Equivalence partitioning strives to define a test case that uncovers classes of errors and thereby reduces the number of test cases needed. It is based on an evaluation of equivalence classes for an input condition. An equivalence class represents a set of valid or invalid states for input conditions.
Equivalence classes guidelines:
· If an input condition specifies a range, one valid and two invalid equivalence classes are defined.
· If an input condition requires a specific value, then one valid and two invalid equivalence classes are defined.
· If an input condition specifies a member of a set, then one valid and one invalid equivalence classes are defined.
· If an input condition is Boolean, then one valid and one invalid equivalence classes are defined.
Equivalence Class:
A group of tests form an equivalence class if
· They all test the same thing
· If one test reveals a fault, the other ones ( Probably) will too
· If a test does not reveal a fault, the other ones (probably) will not either.
What goes in equivalence?
· There must be a good reason to group tests in one equivalence class
· They involve the same input variable
· The result in Similar ( identical?) operations in the program
· They affect the same output variable
· None force the program to do error handling, or all of them do.
2. Boundary Value Analysis
This method leads to a selection of test cases that exercise boundary values. It complements equivalence partitioning since it selects test cases at the edges of a class. Rather than focusing on input conditions solely, BVA derives test cases from the output domain also. BVA guidelines include:
i. For input ranges bounded by a and b, test cases should include values a and b and just above and just below a and b respectively.
ii. If an input condition specifies a number of values, test cases should be developed to exercise the minimum and maximum numbers and values just above and below these limits.
iii. Apply guidelines 1 and 2 to the output
iv. If internal data structures have prescribed boundaries, a test case should be designed to exercise the data structure at its boundary.
3. Cause-Effect Graphing Techniques:
Cause-effect graphing is a technique that provides a concise representation of logical conditions and corresponding actions. There are four steps:
· Causes (input conditions) and effects (actions) are listed for a module and an identifier is assigned to each
· A cause-effect graph is developed.
· The graph is converted to a decision table.
· Decision table rules are converted to test cases.