JUnit Example code:
class OuterClass {
@Nested
class InnerClass {
@Test
void test() {
}
}
}
This command: mvn test -Dtest=OuterClass* runs all tests in the OuterClass.
This command: mvn test -Dtest=OuterClass$InnerClass* runs all tests in the InnerClass.
This command: mvn test -Dtest=OuterClass$InnerClass#test runs no tests. How can I run only this test method?
use quotes:
mvn test -Dtest='OuterClass$InnerClass#test'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With