Skip to Content
The Art of Software Testing, Second Edition
book

The Art of Software Testing, Second Edition

by Glenford J. Myers, Corey Sandler, Tom Badgett, Todd M. Thomas
June 2004
Intermediate to advanced
256 pages
4h 56m
English
Wiley
Content preview from The Art of Software Testing, Second Edition

3.3. An Error Checklist for Inspections

An important part of the inspection process is the use of a checklist to examine the program for common errors. Unfortunately, some checklists concentrate more on issues of style than on errors (for example, "Are comments accurate and meaningful?" and "Are if-else, code blocks, and do-while groups aligned?"), and the error checks are too nebulous to be useful (such as "Does the code meet the design requirements?"). The checklist in this section was compiled after many years of study of software errors. The checklist is largely language independent, meaning that most of the errors can occur with any programming language. You may wish to supplement this list with errors peculiar to your programming language and with errors detected after using the inspection process.

3.3.1. Data Reference Errors

  1. Does a referenced variable have a value that is unset or uninitialized? This probably is the most frequent programming error; it occurs in a wide variety of circumstances. For each reference to a data item (variable, array element, field in a structure), attempt to "prove" informally that the item has a value at that point.

  2. For all array references, is each subscript value within the defined bounds of the corresponding dimension?

  3. For all array references, does each subscript have an integer value? This is not necessarily an error in all languages, but it is a dangerous practice.

  4. For all references through pointer or reference variables, is the referenced ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

The Art of Software Testing, 3rd Edition

The Art of Software Testing, 3rd Edition

Glenford J. Myers, Corey Sandler, Tom Badgett
Software Requirements, 3rd Edition

Software Requirements, 3rd Edition

Karl Wiegers, Joy Beatty
Software Testing: Principles and Practices

Software Testing: Principles and Practices

Srinivasan Desikan, Gopalaswamy Ramesh

Publisher Resources

ISBN: 9780471469124Purchase book