Inspection, Testing and Formal Methods

Bart Massey 2013-11-14


  • Misc notes
  • Inspection, Testing and Formal Methods
  • Formal Inspection
  • In-Class Exercise

Misc Notes

Inspection, Testing and Formal Methods

  • The three pillars of V&V

  • We have talked about testing at some length

  • Formal Methods are mostly outside the scope of this course

    • We did a "correctness proof" last week
  • Inspection is the big deal


  • Several kinds: desk checking, code walkthroughs, Fagan Inspection

  • Get in the habit of desk checking all code before trying to use it for the first time

  • Do a Fagan Inspection of difficult or interesting code

Fagan Inspection (c.f. Wikipedia)

  • Goal: Remove defects in work product

  • Plan: Group examination of work product

Fagan Inspection Phases

  • Planning Phase: Prepare materials, invite participants, set meeting

  • Overview Phase: Brief participants on materials, assign roles

  • Preparation Phase: Participants individually review materials

  • Inspection Meeting

  • Rework Phase: Author deals with issues

  • Followup Phase: Moderator checks work

Inspection Meeting Construction

  • 4-6 people

    • Need enough people to handle roles
    • No management
  • Max 2 hours (even then, take a break)

  • Max 500 lines of work product

Inspection Meeting Organization

  • Role-based

    • Author: Person who wrote the work material

    • Passive unless asked direction questions

    • Reader: Reads the work material

    • Moderator: Runs the meeting

    • Reviewer: Raises issues

    • Recorder: Records issues

Inspection Meeting Conduct

  • Author: Sits and waits for questions

    • When questioned, responds briefly and to the point
  • Reader: Reads a line of work product when requested by the Moderator

  • Moderator: Enforces the meeting rules; sets the pace

  • Reviewer: After each line of work product is read, says "stop" if issue is noted, then gives the issue

    • No attempt is made to correct the issue
    • Discussion should be limited to making sure the issue is recorded correctly
    • When in doubt, an issue is recorded
  • Recorder: Records issues on a standard form


  • Author disposes of each issue as they see fit

    • Root cause analysis and propagation happens here
    • It is still the author's work product
  • Moderator checks author's work

  • Issues are archived, and post-correction steps are taken

    • Regression tests are written
    • Mitigation measures are decided
Last modified: Thursday, 14 November 2013, 8:46 AM