JUnit5 Console Launcher

JUnit5 Console Launcher run with dependency jar

Posted by Archon on June 26, 2019

说明与依赖

说明:https://junit.org/junit5/docs/current/user-guide/#running-tests-console-launcher

依赖:https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/

使用

编译

1
2
3
javac -cp junit-platform-console-standalone-1.4.2.jar \
-d out \
MyTest.java

运行

加入JDBC依赖

1
2
3
4
java -cp out:junit-platform-console-standalone-1.4.2.jar:mysql-connector-java-5.1.46-bin.jar \
org.junit.platform.console.ConsoleLauncher \
-m MyTest#test1 \
-m MyTest#test2

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.