Parameterized Tests Setup
This lesson demonstrates how to setup and run Parameterized Tests in JUnit 5.
We'll cover the following
Introduction to Parameterized Tests
Parameterized tests allow us to run a test multiple times with different arguments. Parameterized tests are normal test methods but instead of annotating them with @Test
, we use @ParameterizedTest
annotation.
In order to pass different arguments to @ParameterizedTest
annotated method, we need to provide a source
.
A source is simply a collection of different arguments.
JUnit 5 has many types or ways through which we pass different arguments to test methods.
Get hands-on with 1400+ tech skills courses.