R84 Write a regression test only for a bug that occurred

Off by default

Write a regression test only for a bug that actually occurred.

Reason

Every test is code that is run, read and kept up for as long as it stays, so each one must be indispensable (Art. III §4). A test against a failure that has happened guards against something known to happen; one against a failure only imagined adds that cost for a risk no one has seen.

Verification

A regression test is one whose purpose is to keep a past failure from coming back, as its name, its comments or the description of the change that adds it say. The bug occurred when a record shows it: an issue, a report, a failing run, or the change that fixes it. A test of behavior a change adds where no bug is fixed (rule 89) is not a regression test.

Violated when a change adds a regression test for a failure that no record shows to have occurred.

Provisions of the constitution it cites

Relations

Parent
R277 Testing
Requires
none
Conflicts with
none

Metadata

ID
84
Revision
3
Kind
rule
Status
trial
Slug
regression-test-for-an-occurred-bug
Default level
project
Constitution revisions
>=1
Check
none
Default
off
Uses
Instructions instructions, Review review
Original language
English en
Translations
Chinese zh