Software Inspection
Inspection is the systematic examination of software artifacts by individuals other than the creator, with the goal of detecting defects. It is consistently shown to be the most cost-effective verification technique, finding 60-90% of defects at 1/10 to 1/34 the cost of testing [1] [2].
Why Inspection?
| Benefit | Evidence |
|---|---|
| Early defect detection | 90% of lifecycle defects found [1] |
| Cost savings | 1:10 to 1:34 vs. testing [3] |
| Productivity gain | 23% improvement [4] |
| Knowledge transfer | Team learns codebase and standards |
Definitions
INCOSE Definition
Inspection is a verification method that determines performance by examining:
- Engineering documentation produced during development
- The item itself using visual means or simple measurements
Practitioner Definition
Inspection is the systematic scrutiny of development artifacts by individuals other than the creator, aiming to detect non-conformities with standards and uncover defects.
Inspection Techniques (Formality Spectrum)
Adapted from K. Wiegers, Peer Reviews in Software (2002) [5]
timeline
title Inspection Techniques (Most Formal → Least Formal)
Fagan inspections: Well-defined entry/exit conditions, non-author presentation
Team review: Formal meeting with stakeholders for comment/approval
Walkthrough: Designer leads team through product for questions/comments
Tool-assisted code review: Line-by-line critique with diff, annotations, commenting
Pair programming: Two developers share writing and reviewing in real-time
Ad hoc review: Unstructured, spontaneous reviews
Key Topics
Fagan Inspection Process
The foundational method established by Michael Fagan at IBM (1976):
- Six mandatory steps
- Four defined roles
- Optimal parameters (90-125 NCSS/hr, 2hr max)
Reading Techniques
How inspectors analyze artifacts during preparation:
- Checklist-based
- Scenario-based (+35% defects)
- Perspective-Based Reading (+21-30%)
Defect Estimation
Two methods to estimate remaining defects:
- Fault Injection: Seed defects, measure detection rate
- Capture-Recapture: Lincoln-Petersen formula, 4+ inspectors
- Model selection (Mₕ with Jackknife)
Effectiveness Data
Comprehensive cost/benefit evidence:
- Detection rates: 60-90%
- Cost ratios: 1:10 to 1:34 vs. testing
- Industry case studies (HP, IBM, Cisco)
Quick Reference: Optimal Parameters
| Parameter | Recommendation | Source |
|---|---|---|
| Team size | 4 people | [1] |
| Meeting duration | Max 2 hours | [1] |
| Inspection rate | 90-125 NCSS/hr | [1] |
| Preparation rate | 100-125 NCSS/hr | [1] |
| Change size (modern) | <100 lines | [6] |
| Review latency (modern) | <4 hours | [6] |
Inspection vs. Testing
| Aspect | Inspection | Testing |
|---|---|---|
| Timing | Earlier (requirements, design, code) | Later (executable code) |
| Finds | Omissions, design issues, style | Runtime failures |
| Cost per defect | 1× | 10-34× |
| Hours per defect | 1.4-1.75 | 6-17 |
Inspection and testing are complementary — use both for comprehensive verification.
Evolution: Formal → Lightweight
| Era | Approach | Characteristics |
|---|---|---|
| 1976 | Fagan | 4 people, meetings, 6 steps |
| 2000s | Tool-assisted | Async, 1-2 reviewers |
| 2018 | Modern (Google) | 24 lines, <4 hours, 1 reviewer |
The core principles remain: preparation matters, systematic review finds defects, small chunks work best.
References
- M. E. Fagan, “Design and Code Inspections to Reduce Errors in Program Development,” IBM Systems Journal, vol. 15, no. 3, pp. 182–211, 1976, doi: 10.1147/sj.153.0182.
- O. Laitenberger and J.-M. DeBaud, “An Encompassing Life Cycle Centric Survey of Software Inspection,” Journal of Systems and Software, vol. 50, no. 1, pp. 5–31, 2000, doi: 10.1016/S0164-1212(99)00073-4.
- J. Dodd, “Formal Inspections.” 2003.
- M. E. Fagan, “Advances in Software Inspections,” IEEE Transactions on Software Engineering, vol. 12, no. 7, pp. 744–751, 1986, doi: 10.1109/TSE.1986.6312976.
- K. E. Wiegers, Peer reviews in software: A practical guide. Addison-Wesley Boston, 2002.
- C. Sadowski, E. Söderberg, L. Church, M. Sipko, and A. Bacchelli, “Modern Code Review: A Case Study at Google,” in ICSE-SEIP 2018, ACM, 2018, pp. 181–190. doi: 10.1145/3183519.3183525.
Disclaimer: AI is used for text summarization, polishing and explaining. Authors have verified all facts and claims. In case of an error, feel free to file an issue.