Skip to content

Answers Quote by Brian Kernighan

“... it is a fundamental principle of testing that you must know in advance the answer each test case is supposed to produce. If you don't, you are not testing; you are experimenting.” quote by Brian Kernighan
Download Open image
“... it is a fundamental principle of testing that you must know in advance the answer each test case is supposed to produce. If you don't, you are not testing; you are experimenting.”

Brian Kernighan

About This Quote

Source Book: The C Programming Language, 1978

Testing requires a known expected result; without it, you are merely experimenting, not verifying.

In simple terms: You must know the expected answer before testing.

Key Takeaway

Define expected outcomes before testing.

Themes

software testing verification methodology

Mood

analytical critical

Type

instructional technical

When to use this quote

  • unit testing
  • integration testing
  • test-driven development

Key Concepts

expected result experimental design

Questions to Reflect On

  • How do you determine expected outcomes for new features?
  • What risks arise from testing without clear expectations?
A Different Perspective

If the expected result is unknown, testing cannot validate correctness.

2.4 out of 5 (9 ratings)

More by Brian Kernighan

Explore all 21 Brian Kernighan quotes

More Answers quotes

Browse all 7,843 Answers quotes