liveBook · Manning

Parameterized testing

Parameterized testing is a technique that executes the same test logic with multiple supplied sets of input or configuration values.

How 2 Manning books explain it

Unit Testing Principles, Practices, and Patterns

A parameterized test is a test whose logic is executed with multiple sets of input values or expected results.

How it is used
Groups similar unit-test scenarios to reduce duplicated test code.
How deep it goes
Explains data rows, theories, InlineData, complex member data, and readability trade-offs without descending into framework internals.
Examples
Uses delivery-date validation with dates from yesterday through two days ahead and Boolean validity results.
What you can do after
Apply it via xUnit to consolidate similar tests while preserving separate names for especially important scenarios.

Read how Unit Testing Principles, Practices, and Patterns explains parameterized testing →

The Art of Unit Testing 3e

A parameterized test is a test whose logic runs repeatedly with different values drawn from a parameter set or table.

How it is used
Reduces duplicated tests when one scenario varies only by input values and expected outputs.
How deep it goes
Explains table-driven repetition, multiple parameters, alternatives, and the boundary between reuse and unreadable generic tests.
Examples
Uses uppercase-password validation and numeric sum tests to contrast repeated tests with table-driven cases.
What you can do after
Apply it via Jest's test.each or a vanilla JavaScript loop while keeping each parameter table focused on one scenario.

Read how The Art of Unit Testing 3e explains parameterized testing →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.