White box testing: Need, Skill required and Limitations

What is White Box Testing?

White box testing (WBT) is also called Structural or Glass box testing.

White box testing involves looking at the structure of the code. When you know the internal structure of a product, tests can be conducted to ensure that the internal operations performed according to the specification. And all internal components have been adequately exercised.

White Box Testing is coverage of the specification in the code.

Code coverage:

Segment coverage:

Ensure that each code statement is executed once.

Branch Coverage or Node Testing:

Coverage of each code branch in from all possible was.

Compound Condition Coverage:

For multiple conditions test each condition with multiple paths and combination of the different path to reach that condition.

Basis Path Testing:

Each independent path in the code is taken for testing.

Data Flow Testing (DFT):

In this approach you track the specific variables through each possible calculation, thus defining the set of intermediate paths through the code.DFT tends to reflect dependencies but it is mainly through sequences of data manipulation. In short, each data variable is tracked and its use is verified.

This approach tends to uncover bugs like variables used but not initialize, or declared but not used, and so on.

Path Testing:

Path testing is where all possible paths through the code are defined and covered. It’s a time-consuming task.



Loop Testing:

These strategies relate to testing single loops, concatenated loops, and nested loops. Independent and dependent code loops and values are tested by this approach.

Why we do White Box Testing?

To ensure:

The need of White Box Testing?

To discover the following types of bugs:

Skills Required:

We need to write test cases that ensure the complete coverage of the program logic.

For this we need to know the program well i.e. We should know the specification and the code to be tested. Knowledge of programming languages and logic.

Limitations of WBT:

Not possible for testing each and every path of the loops in the program. This means exhaustive testing is impossible for large systems.

This does not mean that WBT is not effective. By selecting important logical paths and data structure for testing is practically possible and effective.

Reference- http://www.softrel.org/stgb.html

Comment out your queries on white box testing below. Meantime I will cover Black box testing in detail.