Table of Contents
This is an early draft of a textbook supplement devoted to the topic of software testing.
Look at any catalog of Computer Sicence textbooks and you will find numerous books with titles like "Programming in C++", "Introduction to Programming in Java", etc. Most of these books do not, however, teach programming. They teach coding, the information necessary to write programs in some specific programming language.
For both professional and student programmers, however, coding is only a part of the larger process of programming. In particular, programmers will typically spend as much or more time in testing and debugging as they do in coding. Yet most of these programming texts give these topics passing mention at best. I challenge you - grab the closest "Programming in..." book that you can lay your hands on. Look in the index for testing and debugging. What percentage of the book addresses these topics? 1%? 0.1%? That's not much attention for an activity that can take 50% of a programmer's time.
For instructors who prefer to stick close to their textbooks in preparing their courses, this means that students will be left to fend for themselves on these topics. The inevitable result is students who are unpleasantly surprised to discover that their submitted programming assignments fail the instructors' tests, or who can't figure out how to fix problems in their code without someone else walking them through a diagnostic procedure.
I am a firm believer that testing and debugging are teachable subjects, and that such instruction should an essential and integrated part of early programming classes.
The chapters that follow are gleaned from my notes for courses taught at Old Dominion University. My intention is to develop supplemental chapters they can be inserted into the course outline of most C++ and Java introductory courses.