Need flag to skip multiple test cases and not through pom.
-Dtest=!abc.demo1IT and -Dtest=!*test
Want to skip abc.demoIT and unit test cases using flag. How do I combine these 2?
mvn -Dtest=[!abc.demo1IT |!*test] clean install
does not seem to work.
Referece from Skipping tests in some modules in Maven
Advertisement
Answer
You can exclude multiple patterns using a comma-separated list. Make sure you enclose it in quotes so that it’s treated as a single option:
"-Dtest=!abc.demo1IT, !*test"
Reference: https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#test