See structural test case design. BS 7925-1.British Computer Society Specialist Interest Group in Software Testing (BCS SIGIST)
Techniques and Tools
As the name suggests, white box testing is opposed to it its black box counterpart. White box covers a wide range of techniques. They are all based on the internal structure, or code of the component.
This closeness to the code of an individual component makes it an essential element of Component Testing. White box is often interchangeable with structural testing and glass box testing.
The analysis and running of sometimes very complex code means that developers are most likely to use these techniques, as part of their develpment process.
Techniques
White box is usually split into two groups. Static Analysis and Dynamic Analysis. The essential difference between them is that static techniques do not necessarily require the code to be executed.
Static Analysis
Static analysis covers many different techniques. In terms of finding faults in the software, they concerned with everything up to the early runs of the components functionality. This covers reviewing whether requirements and descriptions of the software are clear, unambigous and to standards. Once the code has been written it can be tested for standards compliance, syntax and complexity.
An example of a metric, derived from static analysis is McCabes Cyclomatic Complexity Metric. A figure is generated indicating the complexity of the component or components. The higher the complexity goes, the probability of a fault increases.
Static analysis can be undertaken manually or automatically depending on the type of test and the organisation. The most important technique is that of Reviews. and Inspection. The more rigourous of the two is Inspection with a very clearly laid down framework for rigourously checking documentation and sometimes code. Proponents claim dramatic decreases in defects found in the final software. Also known as Fagan Inspections after the man who introduced them at IBM.
Reviews are much less rigourous in there framework and range from simple walkthroughs from an anlalyst to formal technical reviews involving many stakeholders.
Tools are available for static analysis. These include syntax parsers and data-flow analysers.
See more about Static Analysis
Dynamic Analysis might be "proper" testing by some compared to static, as it involves executing some kind of code. I would disagree. The whole point of testing is to ensure software meets the requirements of the customer. If that can be ensured by checking and amending a document then, that is testing.
Dynamic Analysis
Two important techniques of dynamic analysis are branch, where each branch in the code has to be traversed at least once, and path testing which deals with complexity.
A number of tools are available for dynamic analysis. These include Test Coverage (calculates how much of the code can be tested), tracers (records details such as variable values as the program runs), runtime analysis tools and simulators. A test harness may be used as well.
See more of dynamic analysis
White Box testing (or structurall testing is on the ISEB Practitioner syllabus
|