I have a slight problem with the Surefire plugin.
I have a nested test class hierarchy:
public class NestClassContainer {
public static class TestClass1 {
@Test
public void testC1_m1() {
}
}
public static class TestClass2 {
@Test
public void testC2_m1() {
}
}
}
My goal is to execute the methods in only one of the nested classes. Unfortunately I am unable to be specific with surefire (Example: only execute testC2_m1() ), even though this is easily possible in both TestNG and in IntelliJ.
I have tried:
mvn clean test -Dtest=NestClassContainer$TestClass2
or even:
mvn clean test -Dtest=com.adobe.campaign.tests.integro.phased.NestClassContainer$TestClass2
I have even tried removing the default excludes in the surefire configuration.
General information:
- Testng 7.5
- Maven 3.8.6
- Surefire : 2.19.1, 2.22.1, 3.0.0-M1
- java 1.8.0_341 JDK