liveBook · Manning

Parameterized testing

Also called parameterized test

Parameterized testing runs the same test logic against multiple sets of supplied input values or parameters.

How 4 Manning books explain it

Test Driven: Practical TDD and Acceptance TDD for Java Developers

A test pattern in which one test method applies the same test logic to multiple data sets supplied as parameters.

How it is used
Uses one test method to reuse test logic across different inputs.
How deep it goes
Explains data provision, constructor binding, instance creation, and test invocation in JUnit 4.
Examples
Illustrates the pattern with a JUnit 4 parameterized test class.
What you can do after
Apply it via JUnit 4 to run shared test logic against multiple data sets.

Read how Test Driven: Practical TDD and Acceptance TDD for Java Developers explains parameterized testing →

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 →

Functional Programming in C#, Second Edition

A unit test whose inputs are supplied as parameters so that one test definition can check multiple input cases.

How it is used
Checks a validator against varied inputs while encouraging tests framed as input-output mappings.
How deep it goes
Explains test cases through date offsets and framework attributes, without detailing framework internals.
Examples
Tests a transfer date set to today, yesterday, tomorrow, or 366 days ahead.
What you can do after
Apply parameterized tests using NUnit TestCase, xUnit Theory and InlineData, or MSTest DataRow.

Read how Functional Programming in C#, Second Edition explains parameterized testing →

Also covered in

What to know first

Related concepts

Questions about parameterized testing

What is parameterized testing?

Parameterized testing runs the same test logic against multiple sets of supplied input values or parameters.

Which Manning books explain parameterized testing?

Test Driven: Practical TDD and Acceptance TDD for Java Developers, Unit Testing Principles, Practices, and Patterns, The Art of Unit Testing 3e and Functional Programming in C#, Second Edition.

What should I know before learning parameterized testing?

Manning books that teach parameterized testing usually introduce software testing and system under test first.

What kinds of parameterized testing are there?

Kinds of parameterized testing include property-based testing.

What is parameterized testing also called?

Parameterized testing is also called parameterized test.

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.