WHITE BOX TESTING (also known as Clear Box Testing, Open Box Testing, Glass Box Testing, Transparent Box Testing, Code-Based Testing or Structural Testing) is a software testing method in which the internal structure/ design/ implementation of the item being tested is known to the tester.
ISTQB Definition
- white-box testing: Testing based on an analysis of the internal structure of the component or system.
- white-box test design technique: Procedure to derive and/or select test cases based on an analysis of the internal structure of a component or system.
Elaboration
During White Box Testing, the tester chooses inputs to exercise paths through the code and determines the appropriate outputs. Programming know-how and the implementation knowledge is essential. White box testing is testing beyond the user interface and into the nitty-gritty of a system. This method is named so because the software program, in the eyes of the tester, is like a white/transparent box; inside which one clearly sees.
Example
A tester, usually a developer as well, studies the implementation code of a certain field on a webpage, determines all legal (valid and invalid) AND illegal inputs and verifies the outputs against the expected outcomes, which is also determined by studying the implementation code.
White Box Testing is like the work of a mechanic who examines the engine to see why the car is not moving.
Levels
White Box Testing method is applicable to the following levels of software testing:
- Unit Testing: For testing paths within a unit.
- Integration Testing: For testing paths between units.
- System Testing: For testing paths between subsystems.
However, it is mainly applied to Unit Testing.
Advantages
- Testing can be commenced at an earlier stage. One need not wait for the GUI to be available.
- Testing is more thorough, with the possibility of covering most paths.
Disadvantages
- Since tests can be very complex, highly skilled resources are required, with a thorough knowledge of programming and implementation.
- Test script maintenance can be a burden if the implementation changes too frequently.
- Since this method of testing is closely tied to the application being tested, tools to cater to every kind of implementation/platform may not be readily available.
White Box Testing is contrasted with Black Box Testing. Read the Differences between Black Box Testing and White Box Testing.
(Icon used in the featured image was made by MD Badsha Meah from www.freeicons.io)
As the software industry moves away from Waterfall to Agile software development approach, you MUST also learn about AGILE TESTING.
Last Updated on March 12, 2023 by STF