Walkthrough, and How It Differs From an Inspection
Chapter Thirty
Syllabus topic Module 1, "Verification and Validation (V&V): Walkthrough"
Pages 165 to 170 of 622
In one line
A walkthrough is a review led by the author, who takes colleagues step by step through a work product so that they understand it, discuss it and point out problems; an inspection is led by a trained moderator, has one aim in its meeting (finding errors), and measures and follows up what it finds.
In the wording a student can write in an examination: a walkthrough is a "formal review in which an author leads members of the review through a work product, and the participants ask questions and make comments about possible issues" (ISO/IEC 20246:2017). The ISTQB syllabus lists its objectives as "evaluating quality and building confidence in the work product, educating reviewers, gaining consensus, generating new ideas, motivating and enabling authors to improve and detecting anomalies", and says individual preparation is not required. It differs from an inspection in who leads it (the author against a trained moderator), its objective (understanding and consensus as well as errors, against errors alone), its process (a meeting with optional preparation, against five operations with rework and follow-up), its roles, checklists and data (informal, against defined and measured) and its repeatability.
What a walkthrough is
Three definitions in the software engineering vocabulary describe the same activity from slightly different angles.
- ISO/IEC/IEEE 24765 calls it a "static analysis technique in which a designer or programmer leads members of the development team and other interested parties through a segment of documentation or code, and the participants ask questions and make comments about possible errors, violation of development standards, and other problems".
- ISO/IEC 20246 calls it a "formal review in which an author leads members of the review through a work product, and the participants ask questions and make comments about possible issues".
- ISO/IEC 2382 defines a structured walkthrough as a "systematic examination of the requirements, design, or implementation of a system, or any part of it, by qualified personnel".
Two features are common to all three. The author leads: the person who produced the work presents it, in the order they choose. And the participants respond: they ask questions and comment as the author goes. Everything else, how much preparation, how many people, what is recorded, varies from one organisation to the next.
Why teams hold walkthroughs
The ISTQB syllabus gives a walkthrough more objectives than any other review type: "A walkthrough, which is led by the author, can serve many objectives, such as evaluating quality and building confidence in the work product, educating reviewers, gaining consensus, generating new ideas, motivating and enabling authors to improve and detecting anomalies. Reviewers might perform an individual review before the walkthrough, but this is not required."
That breadth is the reason to choose one. A walkthrough suits:
Walkthrough, and How It Differs From an Inspection
- teaching: a new team member learns the fee module fastest by having its author walk through it;
- early drafts: an author who wants reactions before finishing a design;
- consensus: a team choosing between two approaches, where discussing alternatives is the point;
- stakeholders who are not programmers: an analyst walking the exam cell through the requirements, which is validation in the sense of Chapter Twenty-Six;
- work of moderate risk, where the cost of a full inspection is not justified.
Roles in a walkthrough
A walkthrough needs fewer roles than an inspection, and they are less fixed.
| Role | In a walkthrough |
|---|---|
| Author (presenter) | Leads the session and presents the work product, in the order they choose |
| Participants (reviewers) | Colleagues, and sometimes users or other stakeholders; they ask questions and comment |
| Scribe | Often present, recording the issues raised; in informal practice sometimes the author |
| Moderator | Optional; where there is one, they keep the meeting on time and on topic |
Leading a code walkthrough: tracing test cases by hand
A code walkthrough can drift into a line-by-line reading that nobody remembers. A more effective way for the author to lead is to trace test cases through the code by hand: participants bring a few test cases, each with its expected result, and the author "executes" the code on paper for each one, saying aloud what every line does to every variable. The participants follow, and a wrong value shows up at the line where it happens.
Here is the author of ExamReg's fee function leading such a walkthrough. The fee rules are the book's fixed ones: a form fee of Rs 800, Rs 150 for each backlog paper, the late fee of Chapter One, on what software testing is, forms more than 15 days late refused, a negative number of days refused as invalid input, and a concession that waives the form fee only, as the Scrum team of Chapter Seventeen established.
FORM_FEE, BACKLOG_FEE = 800, 150
def total_fee(days_late, backlog_papers, concession):
if days_late < 0 or days_late > 15:
raise ValueError("form not accepted")
fee = FORM_FEE + BACKLOG_FEE * backlog_papers
if concession:
fee = 0 # the concession
if days_late <= 0:
late = 0
elif days_late <= 7:
late = 100
else:
late = 500
return fee + late
print("author's own check before the walkthrough, TC1:", total_fee(0, 0, False))The author ran one case before the meeting, and it passed:
author's own check before the walkthrough, TC1: 800The participants bring three test cases:
| Test case | Days late | Backlog papers | Concession | Expected total |
|---|---|---|---|---|
| TC1 | 0 | 0 | No | Rs 800 |
| TC2 | 10 | 1 | No | Rs 1,450 |
| TC3 | 3 | 2 | Yes | Rs 400 |
The author traces each one aloud, and the scribe writes the trace on the board.
Walkthrough, and How It Differs From an Inspection
| Step | TC1 (0, 0, No) | TC2 (10, 1, No) | TC3 (3, 2, Yes) |
|---|---|---|---|
days_late < 0 or days_late > 15? | No | No | No |
fee = 800 + 150 × backlog | 800 | 950 | 1,100 |
concession? | No | No | Yes: fee = 0 |
late | 0 (on time) | 500 (8 to 15 days) | 100 (1 to 7 days) |
| Returned | 800 | 1,450 | 100 |
| Expected | 800 | 1,450 | 400 |
TC3 stops the room. At the concession line the trace sets fee to 0, wiping out the Rs 300 for two backlog papers along with the form fee. A participant asks what the concession is supposed to waive; the answer, the form fee only, is the fix: subtract the form fee instead of zeroing the total. The failing case was never run: the defect was found on paper, at the line that caused it. After the walkthrough the author makes the change, and the three test cases are run on both versions to confirm what the trace showed.
FORM_FEE, BACKLOG_FEE = 800, 150
def total_fee(days_late, backlog_papers, concession): # as walked through
if days_late < 0 or days_late > 15:
raise ValueError("form not accepted")
fee = FORM_FEE + BACKLOG_FEE * backlog_papers
if concession:
fee = 0 # the concession
if days_late <= 0:
late = 0
elif days_late <= 7:
late = 100
else:
late = 500
return fee + late
def total_fee_fixed(days_late, backlog_papers, concession): # after the walkthrough
if days_late < 0 or days_late > 15:
raise ValueError("form not accepted")
fee = FORM_FEE + BACKLOG_FEE * backlog_papers
if concession:
fee -= FORM_FEE # waives the form fee only
if days_late <= 0:
late = 0
elif days_late <= 7:
late = 100
else:
late = 500
return fee + late
cases = [("TC1", (0, 0, False), 800), ("TC2", (10, 1, False), 1450), ("TC3", (3, 2, True), 400)]
for version in (total_fee, total_fee_fixed):
print(version.__name__)
for name, args, expected in cases:
actual = version(*args)
mark = "" if actual == expected else " <- the walkthrough's finding"
print(f" {name} {args}: expected {expected}, got {actual}{mark}")total_fee
TC1 (0, 0, False): expected 800, got 800
TC2 (10, 1, False): expected 1450, got 1450
TC3 (3, 2, True): expected 400, got 100 <- the walkthrough's finding
total_fee_fixed
TC1 (0, 0, False): expected 800, got 800
TC2 (10, 1, False): expected 1450, got 1450
TC3 (3, 2, True): expected 400, got 400The run agrees with the hand trace line for line: the version walked through returns 100 for TC3, and the fixed one 400. Notice also what this walkthrough did and did not do. It found a real defect and it taught the room how the concession works. But it did not use a checklist, did not classify the defect, did not measure anything, and nobody is assigned to verify the fix except the author. Those are exactly the things an inspection adds.
Walkthrough, and How It Differs From an Inspection
Walkthrough against inspection
Fagan, who defined the inspection, compared the two in his 1976 paper. His starting point was that walk-throughs "are practiced in many different ways in different places, with varying regularity and thoroughness. This inconsistency causes the results of walk-throughs to vary widely and to be nonrepeatable. Inspections, however, having an established process and a formal procedure, tend to vary less and produce more repeatable results."
His Table 4 sets the two processes side by side:
| Inspection operation | Objective | Walk-through operation | Objective |
|---|---|---|---|
| 1. Overview | Education (group) | None | None |
| 2. Preparation | Education (individual) | 1. Preparation | Education (individual) |
| 3. Inspection | Find errors! (group) | 2. Walk-through | Education (group); discuss design alternatives; find errors |
| 4. Rework | Fix problems | None | None |
| 5. Follow-up | Ensure all fixes correctly installed | None | None |
His note under the table makes the key point: "Note the separation of objectives in the inspection process." An inspection meeting does one thing; a walk-through meeting does three at once.
His Table 5 compares their key properties:
| Property (Fagan, Table 5) | Inspection | Walk-through |
|---|---|---|
| Formal moderator training | Yes | No |
| Definite participant roles | Yes | No |
| Who drives it | Moderator | Owner of the material (designer or coder) |
| Uses how-to-find-errors checklists | Yes | No |
| Uses the distribution of error types to look for | Yes | No |
| Follow-up to reduce bad fixes | Yes | No |
| Fewer future errors from detailed error feedback to the programmer | Yes | Incidental |
| Improves inspection efficiency from analysis of results | Yes | No |
| Analysis of data leads to process problems and improvements | Yes | No |
And in one comparison of equivalent pieces of an operating system, the inspected sample had "38 percent less errors" in later testing than the walk-through sample, as Chapter Twenty-Nine, on inspection, reported.
Putting Fagan's comparison together with the modern syllabus gives the table a 5-mark answer needs.
| Walkthrough | Inspection | |
|---|---|---|
| Led by | The author | A trained moderator; never the author |
| Main objective | Understanding, consensus, education, and finding problems | Finding the maximum number of errors |
| Process | Optional preparation, then the walkthrough meeting | Overview, preparation, inspection, rework, follow-up |
| Preparation | Optional | Required, with checklists and error-type data |
| Roles | Author and participants; few fixed roles | Defined: moderator, designer, coder, tester, reader |
| Solutions in the meeting | Discussed, including design alternatives | Not discussed; errors only |
| Records and metrics | Few; issues noted | Classified errors, reports, measurements |
| Follow-up of fixes | Left to the author | Verified by the moderator; reinspection if needed |
| Repeatability | Varies widely (Fagan) | More repeatable (Fagan) |
| Best for | Teaching, early drafts, consensus, stakeholder reviews | Critical designs and code, where errors cost most |
Walkthrough, and How It Differs From an Inspection
Choosing between them
The choice follows from the ISTQB syllabus's factors from Chapter Twenty-Eight, on reviews: the criticality of the work product, the objectives, and the need for an audit trail. On ExamReg, the new help pages would go to a walkthrough with the exam cell, because the aim is to check that students will understand them; the fee and payment code would go to an inspection, because a missed error there costs students money. Many teams use both on the same work product: a walkthrough while the design is taking shape, and an inspection once it is complete.
What it does not mean
A walkthrough is not a weak inspection. It has different objectives, and for teaching and consensus it does better than an inspection would.
A walkthrough does not mean no preparation is ever done. Preparation is optional, not forbidden, and participants who prepare find more.
Tracing by hand is not the same as testing. It checks the code against a few expected results in people's heads; the cases still need to be run, as they were after this walkthrough.
Being led by the author is not a flaw. It is what makes a walkthrough good at teaching; it is also why a walkthrough should not be the only review of critical work.
Quick revision
- Walkthrough: an author leads members of the review through a work product; participants ask questions and comment (ISO/IEC 20246). Led by the author; preparation optional (ISTQB).
- Objectives (ISTQB v4.0.1): evaluate quality and build confidence, educate reviewers, gain consensus, generate ideas, motivate authors, detect anomalies.
- Tracing test cases by hand is an effective way to lead a code walkthrough; the ExamReg trace found a concession that wiped out backlog fees.
- Fagan's Table 4: the inspection has five operations with separate objectives; the walk-through has preparation and one meeting with mixed objectives.
- Fagan's Table 5: inspections have moderator training, defined roles, checklists, error-type data, follow-up, feedback and process analysis; walk-throughs do not.
- Walk-through results "vary widely" and are "nonrepeatable"; inspections are more repeatable; the inspected sample had 38 per cent fewer errors.
- Use walkthroughs for teaching, drafts, consensus and stakeholders; inspections for critical work.
Test yourself
1. What is a walkthrough, and who leads it? A review in which the author leads members of the review through a work product while the participants ask questions and comment on possible issues. The author leads it, presenting the work in the order they choose.
2. What are the objectives of a walkthrough? Evaluating quality and building confidence in the work product, educating reviewers, gaining consensus, generating new ideas, motivating and enabling authors to improve, and detecting anomalies.
3. Differentiate between a walkthrough and an inspection. A walkthrough is led by the author, an inspection by a trained moderator who is never the author. A walkthrough aims at understanding and consensus as well as problems, and may discuss solutions; an inspection's meeting aims only at finding errors. A walkthrough is a meeting with optional preparation; an inspection has overview, preparation, inspection, rework and follow-up. An inspection uses defined roles, checklists, error-type data and metrics, and verifies fixes; a walkthrough usually does not, so its results are less repeatable.
Walkthrough, and How It Differs From an Inspection
4. How can an author lead a code walkthrough effectively? By tracing test cases through the code by hand: participants bring test cases with expected results, and the author executes the code on paper, saying what each line does to each variable, so that a wrong value appears at the line that causes it.
5. When would you choose a walkthrough rather than an inspection? When the aim is teaching, gathering reactions to an early draft, reaching consensus, or checking a work product with non-technical stakeholders, and the work is not so critical that the cost of a full inspection is justified.
The rest of this subject
These notes are cut from the University's printed syllabus. Open the syllabus itself, or the past papers, for the same subject.