lecture 7 of 180 completed

One test, many datasets

Ten near-identical tests is a maintenance problem. Generate them from data, and keep each failure readable.

What you'll learn

  • How to generate one test per dataset
  • Why each case must fail on its own
  • Why generated tests must be built at the top level

A card validation suite can end up with eleven copies of one test. Same steps, different card number. When the error message is reworded, that is eleven blocks to edit, and one will be missed.

Describe the cases as data and let one body handle all of them.

members only

Keep reading with the full course

The Foundations track and the first 5 lectures of each framework are free. This lecture is part of the paid course, which unlocks every lecture, all three frameworks, and downloads.

See the options →