Code coverage criteria

Whenever we identify a line of code that is not covered, we have to decide how thorough (or rigorous) we want to be when covering that line. Let’s revisit an if statement from the CountWords program. Listing 3.4 An if expression from the CountWords program A developer may decide to only cover the line —in other words, if a test passes through that if line, the developer… Continue reading Code coverage criteria

Structural testing in a nutshell

Based on what we just did, let me define a simple approach that any developer can follow (see figure 3.4): Figure 3.4 Applying structural testing in a nutshell. Arrows indicate the iterative nature of the process. The diamond represents the moment where the developer decides whether to write the test case. The most important thing… Continue reading Structural testing in a nutshell

Introduction

We discussed using software requirements as the main element to guide the testing. Once specification-based testing is done, the next step is to augment the test suite with the help of the source code. There are several reasons to do so. First, you may have forgotten a partition or two when analyzing the requirements, and you… Continue reading Introduction