当我尝试在 Windows 终端中运行 Randoop 时,出现以下错误:
C:\Users\dell13\workspace\project>java -classpath .;.\randoop-3.0.7\randoop-all-3.0.7.jar randoop.main.Main gentests --testclass=Factorial --timelimit=60
policy = sun.security.provider.PolicyFile@5fd0d5ae
Throwable thrown while handling command: java.lang.Error: Unable to load type "Factorial" due to exception: null
java.lang.Error: Unable to load type "Factorial" due to exception: null
at randoop.main.ThrowClassNameError.handle(ThrowClassNameError.java:16)
at randoop.reflection.OperationModel.addClassTypes(OperationModel.java:307)
at randoop.reflection.OperationModel.createModel(OperationModel.java:132)
at randoop.main.GenTests.handle(GenTests.java:193)
at randoop.main.Main.nonStaticMain(Main.java:63)
at randoop.main.Main.main(Main.java:27)
Randoop failed.
Last sequence under execution: null
我试图在其上运行 Randoop 的文件是 Factorial.class,它位于当前工作目录中。当前工作目录还包含包含所有 randoop 文件/jar 的文件夹。我不确定为什么会发生这种情况,因为我在我的 Mac 上尝试过它,它似乎工作得很好。