21.08.2013 Views

Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

282 Chapter 19 ■ Testing<br />

19.2 There are four paths through the program, which can be exercised by the<br />

following test data:<br />

Test number Outcome<br />

1 3 2 1 3<br />

2 3 2 5 5<br />

3 2 3 1 3<br />

4 2 3 5 5<br />

19.3 There are three paths through the program extract, including the path<br />

where neither of the conditions in the if statements are true. But each<br />

of the error messages can be triggered by two conditions. Suitable test<br />

data is there<strong>for</strong>e:<br />

Test number Row Column Outcome<br />

1 5 6 OK<br />

2 0 4 invalid<br />

3 9 4 invalid<br />

4 5 9 invalid<br />

5 5 0 invalid<br />

•<br />

Further Reading<br />

This book surveys studies of the types of fault that occur and explains the different testing<br />

methods, in a very readable way: Marc Roper, <strong>Software</strong> Testing, McGraw-Hill,<br />

1994.<br />

A readable practical review of testing techniques: Cem Kaner, Testing Computer<br />

<strong>Software</strong>, John Wiley, 1999.<br />

The following book describes lessons in debugging and testing learned at Microsoft.<br />

The author, Steve Maguire, is a strong advocate of stepping through code using the<br />

debugger as a good way of finding bugs. The examples given are in C: Steve<br />

Maguire, Writing Solid Code, Microsoft Press, 1993.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!