I have a fat JAR called smoke-tests-fat-1.0.0-SNAPSHOT.jar
containing JUnit 5 tests. The tests are annotated with org.junit.jupiter.api.Test
at the method level.
I now want to execute these tests with the JUnit 5 Console Launcher. However, it seems that I can't get it right.
I have tried:
java -jar junit-platform-console-standalone.jar --classpath smoke-tests-fat-1.0.0-SNAPSHOT.jar --scan-classpath
java -jar junit-platform-console-standalone.jar --classpath smoke-tests-fat-1.0.0-SNAPSHOT.jar --select-package=my.package
But neither command works. The Console Launcher never finds any tests.
How can I get the Console Launcher to execute my JUnit 5 tests contained in the JAR?