Test selector for all tests in includes plus some extra (JUnit5+Surefire)

Viewed 23

How do I run all tests from the explicitly specified includes in pom.xml as well as some additional test class not contained in the includes.

In other words, I'm looking for one command to select:

  1. all tests that would be normally executed in the standard mvn test run
  2. a separate test class explicitly specified in the argument ExtraTestClass

something along the lines of: mvn test -Dtest="includes,ExtraTestClass"

or

mvn test && mvn test -Dtest="ExtraTestClass"

Is that possible or would I have to adjust the names of all tests included in the standard mvn test run to fit a pattern?

0 Answers
Related