Black Box Testing

Black box testing is a test design method. Black box testing treats the system as a “black-box”, so it doesn’t explicitly use Knowledge of the internal structure. Or in other words the Test engineer need not know the internal working of the “Black box”. It focuses on the functionality part of the module.

Some people like to call black box testing as behavioral, functional, opaque-box, and closed-box. While the term black box is most popularly use, many people prefer the terms “behavioral” and “structural” for black box and white box respectively. Behavioral test design is slightly different from black-box test design because the use of internal knowledge isn’t strictly forbidden, but it’s still discouraged.

Personally we feel that there is a trade off between the approaches used to test a product using white box and black box types.

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.

Tools used for Black Box testing

Many tool vendors have been producing tools for automated black box and automated white box testing for several years. The basic functional or regression testing tools capture the results of black box tests in a script format. Once captured, these scripts can be executed against future builds of an application to verify that new functionality hasn’t disabled previous functionality.

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.

– 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.

– Extends equivalence partitioning

– Test both sides of each boundary

– Look at output boundaries for test cases too

– Test min, min-1, max, max+1, typical values

– BVA focuses on the boundary of the input space to identify test cases

– Rational is that errors tend to occur near the extreme values of an input variable

There are two ways to generalize the BVA techniques:

By the number of variables (For n variables): BVA yields 4n + 1 test cases.

By the kinds of ranges: Generalizing ranges depends on the nature or type of variables:

– NextDate has a variable Month and the range could be defined as {Jan, Feb, …Dec}
Min = Jan, Min +1 = Feb, etc.

– Triangle had a declared range of {1, 20,000}

– Boolean variables have extreme values True and False but there is no clear choice for the remaining three values

Advantages of Boundary Value Analysis:

– Robustness Testing – Boundary Value Analysis plus values that go beyond the limits
Min – 1, Min, Min +1, Nom, Max -1, Max, Max +1

– Forces attention to exception handling

– For strongly typed languages robust testing results in run-time errors that abort normal execution

Limitations of Boundary Value Analysis

BVA works best when the program is a function of several independent variables that represent bounded physical quantities:

1. Independent Variables:

NextDate test cases derived from BVA would be inadequate: focusing on the boundary would not leave emphasis on February or leap years.

– Dependencies exist with NextDate’s Day, Month and Year.
– Test cases derived without consideration of the function

2. 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:

– If an input condition specifies a range, one valid and one two invalid classes are defined.

– If an input condition requires a specific value, one valid and two invalid equivalence classes are defined.

– If an input condition specifies a member of a set, one valid and one invalid equivalence class is defined.

– 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).

Rahnuma is a technical content writer at software testing stuff. A software engineer by degree and a dynamic content creator by passion, she brings to table over 3 years of writing experience in tech niche. Combining her enthusiasm for writing and technology, she loves to share her thoughts on the latest tech trends.

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top