I'm using JUnit 5.3.1 and running tests using maven. There is a parametrised test which is not running. I am using maven-surefire-plugin and this is from my pom.xml
<build> <plugins> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.19</version> <configuration> <includes> <include>**/*Tests.java,**/*Test.java</include> </includes> </configuration> </plugin> ... </build> When I run mvn test command, this is a part of the output:
Running com.growthintel.elastic_plugin.cid_suppressions.CheckCompanyTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.growthintel.elastic_plugin.cid_suppressions.CheckCompanyTest
There are no tests being detected from CheckCompanyTest file! Maven is detecting the file but not detecting any tests within the file. Is there a naming convention for parametrised tests that I am not following? Here is the test file:
public class CheckCompanyTest { private static Stream<Arguments> getListOfSuppressedFilePaths() { ... } @ParameterizedTest(name = "run #{index} with args: {arguments}") @MethodSource("getListOfSuppressedFilePaths") public void test_HasSuppressedCid(List<String> cidSuppressionFilePaths) { ... }