Parameterized testing
Parameterized testing is a technique that executes the same test logic with multiple supplied sets of input or configuration values.
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
- test automation frameworkimplemented by · A test automation framework is software infrastructure that provides conventions and facilities for defining, organizing, executing, and evaluating automated tests.
- testuses · A test is a procedure or check that evaluates behavior using specified inputs or evidence against expected results or criteria.
- code readabilitycontrasts with · Code readability is the ease with which human readers can perceive and understand source code, including its structure and intent.
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.

