Friday, April 23, 2010

Black Box Testing

Black box is a test design method. It focuses on the functionality part of the module. There are some bugs that cannot be found using only black box or only white box. If the test cases are extensive and the test inputs are also from a large sample space then it is always possible to find majority of the bugs through black box testing.

Advantages of Black Box Testing
§    Tester can be non-technical.
§    This testing is most likely to find those bugs as the user would find.
§    Testing helps to identify the vagueness and contradiction in functional specifications.
§    Test cases can be designed as soon as the functional specifications are complete
Disadvantages of Black Box Testing
§    Chances of having repetition of tests that are already done by programmer.
§    The test inputs needs to be from large sample space.
§    It is difficult to identify all possible inputs in limited testing time. So writing test cases is slow and difficult
§    Chances of having unidentified paths during this testing

Types of BBT

§    Graph Based Testing Methods: Software testing begins by creating a graph of important objects and their relationships and then devising a series of tests that will cover the graph so that each objects and their relationships and then devising a series of tests that will cover the graph so that each object and relationship is exercised and error is uncovered.

§    Error Guessing: Error Guessing comes with experience with the technology and the project. Error Guessing is the art of guessing where errors can be hidden. There are no specific tools and techniques for this, but you can write test cases depending on the situation: Either when reading the functional documents or when you are testing and find an error that you have not documented.

§    Boundary Value Analysis: Boundary Value Analysis (BVA) is a test data selection technique (Functional Testing technique) where the extreme values are chosen. Boundary values include maximum, minimum, just inside/outside boundaries, typical values, and error values. The hope is that, if a system works correctly for these special values then it will work correctly for all values in between. Guidelines for boundary value analysis are:
o    If an input condition specifies a range bounded by value ‘a’ and value ‘b’, test cases should be designed with value a and b and just above and below the value a and b.
o    If an input condition specifies a number of value, test cases should be developed that exercise the minimum and the maximum numbers. Values just above and below the maximum numbers are also tested.
The advantages of boundary value analysis are:
o    Robustness Testing - Boundary Value Analysis plus values that go beyond the limits
o    Min - 1, Min, Min +1, Nom, Max -1, Max, Max +1
o    Forces attention to exception handling
o    For strongly typed languages robust testing results in run-time errors that abort normal execution
The limitations of Boundary value analysis are: BVA works best when the program is a function of several independent variables that represent bounded physical quantities
o    Independent Variables
§    Next Date test cases derived from BVA would be inadequate: focusing on the boundary would not leave emphasis on February or leap years
§    Dependencies exist with Next Date’s Day, Month and Year
§    Test cases derived without consideration of the function
o    Physical Quantities: An example of physical variables being tested, telephone numbers - what faults might be revealed by numbers of 000-0000, 000-0001, 555-5555, 999-9998, 999-9999?

§    Equivalence Partitioning: Equivalence partitioning is a black box testing method that divides the input domain of a program into classes of data from which test cases can be derived. EP can be defined according to the following guidelines:
o    If an input condition specifies a range, one valid and one two invalid classes are defined.
o    If an input condition requires a specific value, one valid and two invalid equivalence classes are defined.
o    If an input condition specifies a member of a set, one valid and one invalid equivalence class is defined.
o    If an input condition is Boolean, one valid and one invalid class is defined.

§    Comparison Testing:  There are situations where independent versions of software be developed for critical applications, even when only a single version will be used in the delivered computer based system. It is these independent versions, which form the basis of a black box testing technique called Comparison testing or back-to-back testing.

§    Orthogonal Array Testing: The Orthogonal Array Testing Strategy (OATS) is a systematic, statistical way of testing pair-wise interactions by deriving a suitable small set of test cases from a large number of possibilities. The theory -Orthogonal Array Testing (OAT) can be used to reduce the number of combinations and provide maximum coverage with a minimum number of test cases. OAT is an array of values in which each column represents a variable - factor that can take a certain set of values called levels. Each row represents a test case. In OAT, the factors are combined pair-wise rather than representing all possible combinations of factors and levels.

No comments:

Post a Comment