Structure base testing is the testing of the structure of the system or software component. This testing is often referred to as ‘white box’ or ‘glass box’ or ‘clear-box testing’ because in structural testing we are interested in what is happening ‘inside the system/application’.
Structure Base Testing
In structure base testing the knowledge of the internal implementations of the code is required for testers. Here the testers require knowledge of how the software is implemented, how it works.
Structure-based techniques serve two purposes:
Test coverage measurement
Structural test case design.
Test Coverage Measurement –
Test coverage measures the amount of testing performed by a set of tests. Wherever we can count things and can tell whether or not each of those things has been tested by some test, then we can measure coverage. The basic coverage measure is –
Number of coverage items exercised
Coverage = ———————————————————– x 100%
Total number of coverage items
There is danger in using a coverage measure. 100% coverage does not mean 100%tested!Coverage techniques measure only one dimension of a multi-dimensional concept.
Structural Test Case Design –
In this technique test cases designed with the aim of exercising some or all of the structural elements.
Number of statements exercised
Statement coverage = ——————————————— x 100%
Total number of statements
Statement coverage is calculated by:
Studies and experience in the industry have indicated that what is considered reasonably thorough black box testing may actually achieve only 60% to 75% statement coverage.
Typical ad-hoc testing is likely to be around 30% – this leaves 70% of the statements untested.