How to run JUnit test cases from the command line

前端 未结 11 1578
花落未央
花落未央 2020-11-22 02:09

I would like to run JUnit test cases from the command line. How can I do this?

11条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 02:27

    Ensure that JUnit.jar is in your classpath, then invoke the command line runner from the console

    java org.junit.runner.JUnitCore [test class name]

    Reference: junit FAQ

提交回复
热议问题