White Box (Structured Based) Testing Techniques
What is White Box Testing?
White box testing is a code-based testing technique in which the internal structure is being known to the tester who is going to test the software. Here, the test cases are calculated after analysing the internal structure of the system based on code, branch, path, and condition coverage.
White box testing basically involves the following steps.
- Verifying security loops in the code
- Verifying the broken paths in the code
- Verifying the specified flow structure
- Verifying the desired output
- Verifying the condition loop to check the functionality
- Verifying each line and section
Broadly speaking, software testing techniques are divided on the basis of their ability to identify a specific type of defect. Majorly, software testing is divided into two categories.
Static technique is again sub-divided into the following categories.
- Informal Reviews
- Technical Reviews
- Static Analysis
- Data Flow
- Control Flow
Dynamic technique is sub-divided into three more categories.
- Black Box Testing (Specification based testing or Behavioural techniques)
- Boundary Value Analysis
- Equivalence Partition
- Decision Tables
- State Transition
- Use Case Testing
- White Box Testing (Structure based testing or Structural techniques)
- Statement Coverage
- Decision Coverage
- Condition Coverage
- Decision/Condition Coverage
- Multiple Condition Coverage
- Experience Based Testing
- Exploratory Testing
- Error Guessing
In white-box or glass-box testing technique the test cases are derived using the internal structure of the software. Structure based testing techniques, like component testing, system testing, acceptance testing, etc. can be used at all levels of testing. Here, the code coverage analysis being the main part helps in identifying the gaps in test cases. This helps in improving the overall quality of the software application.
Here, the idea is to cover the entire code statement. This can be done while ensuring that every statement is executed at least once while testing the application. Cantata++ is one of the most popular white box testing tools to test the statement coverage.
Here, we try to cover the entire code decision. This can be done by testing every decision like, if-else, for loop, and other conditional loops while the code is executed at least once. TCAT-path is used for decision coverage.
This white box testing technique involves 100% condition coverage of the code. Here, the each condition of the code is executed at least once.
This is a hybrid or mixed model that involves entire decision/condition coverage of the code. Here, the each condition/decision in the code is executed at least once.
Multiple Condition Coverage
It makes use of a combination of techniques that are most suitable for software application.