当一个测试类在IDE运行无误在命令行执行则是违法的

第一反应应该是去找测试类编译之后.class文件,可能之前对.java做了一堆改动,但是.class并没有改变,所以始终得到类似下面的报错

execute_result.stdout :
JUnit version 4.13.2
.E
Time: 0.002
There was 1 failure:
1) initializationError(org.apache.commons.csv.generated_by_chatgpt.CSVFormatTest1)
org.junit.runners.model.InvalidTestClassError: Invalid test class 'org.apache.commons.csv.gened_by_chatgpt.CSVFormatTest1':
  1. No runnable methods
        at org.junit.runners.ParentRunner.validate(ParentRunner.java:525)
        at org.junit.runners.ParentRunner.(ParentRunner.java:102)
        at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:125)
        at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:111)
        at org.junit.runners.Suite.(Suite.java:81)
        at org.junit.runner.Computer$2.(Computer.java:33)
        at org.junit.runner.Req

你可能感兴趣的:(软件测试技术,java,java,软件测试)