..
116 Manage Software Testing
7.8.4 Test Coverage Problems
Example: we have a system composed of 5 units and 3 primary features. We can insist that the developers
achieve 100% statement coverage of the units. But the tests don??™t evaluate all the conditions, don??™t check if
the loop conditions terminate, and don??™t evaluate all logical operators. So we want to exercise all decisions.
The IF statement in Figure 7.18 can be satisfied if A and B are true. C is not necessarily ever evaluated.
FIGURE 7.16 Example of a tool management summary
FIGURE 7.17 Extract from a test path analysis listing showing an LCSAJ
FIGURE 7.18 Faulty decision coverage evaluation
??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—
??—??—??—??—??—??—??—??— ??—??—??—??—??—??—??—??—
??—??—??—??—??—??—??—??— Management summary ??—??—??—??—??—??—??—??—
??—??—??—??—??—??—??—??— ??—??—??—??—??—??—??—??—
??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—??—
STANDARDS VIOLATIONS IN STATIC ANALYSIS
================================================
LINE No. VIOLATION PENALTY MARK
================================================
18 Use of GOTO statement 10
------------------------------------------------
TOTAL PENALTY FROM STATIC ANALYSIS = 10
TOTAL NUMBER OF LINES IN PROGRAM = 58
LCSAJ
DENSITY
START 12 loop 4
NUMBER OF LCSAJs IN PROGRAM = 26
STATEMENT
.
Pages:
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290