JUnit run tests command line

后端 未结 2 2069
礼貌的吻别
礼貌的吻别 2021-02-10 02:09

I\'ve got the following structure

lib/junit-4.10.jar
tests/Tester.java
tests/Tester.class
build/jar/jar_file.jar

(Tester belongs to package tes

2条回答
  •  旧巷少年郎
    2021-02-10 02:36

    The classpath should be semi colon separated (on Windows - not sure what you are using.)

    java -cp build/jar/jar_file.jar;lib/junit-4.10.jar org.junit.runner.JUnitCore tests.Tester
    

    Also with this command line you will need to run it in your project root

提交回复
热议问题