All-Nodes
De Software testing
Concepts
- All-Nodes requires a test set that exercises at least once each node of the control flow graph, which is equivalent to executing all code blocks of a program at least once. <bib>vincenzi-etal:2007</bib>, <bib>vincenzi-maldonado:slides:2007</bib>
- The statement coverage of a test set T with respect to a program P is computed as <math>|S_{c}|/|(S_{e} - S_{i})|</math>, where <math>S_{c}</math> is the set of statements covered, <math>S_{i}</math> the set of unreachable statement, and <math>S_{e}</math> the set of statements in the program. <bib>mathur:2008</bib>
Facts
- The All-Nodes criterion is also called statement coverage. <bib>delamaro-etal:2007</bib>
- A test set T is considered adequate with respect to the statement coverage criterion if the statement coverage of T with respect to a program P is 1. <bib>mathur:2008</bib>
- The All-Nodes criterion is limited to unit testing. <bib>delamaro-etal:1997</bib>
- Even though the All-Nodes criterion is the simplest structural test criterion, it may be difficult to satisfy in practice:
- Often programs have code that is executed only in exceptional circumstances-low memory, full disk, unreadable files, lost connections, etc.
- Testers may find it difficult or even impossible to simulate these circumstances and thus code that deals with these problems will remain untested. <bib>vincenzi-maldonado:slides:2007</bib>