JUnit 5 Parameterized Tests
This article shows you how to run a test multiple times with different arguments, so-called ‘Parameterized Tests’, let see the following ways to provide arguments to the test: @ValueSource @EnumSource @MethodSource @CsvSource @CsvFileSource @ArgumentsSource We need junit-jupiter-params to support parameterized tests. pom.xml <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> <version>5.5.2</version> <scope>test</scope> </dependency> <!– Parameterized Tests –> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-params</artifactId> …