0

我正在尝试在 Randoop 中运行一个类以自动生成测试用例,我的 randoop 安装在/home/niteshb/Music/randoop-3.0.8 其中,我的 Java 类也在/home/niteshb/Tests.class其中,我试图用命令执行它

 java -ea -classpath /home/niteshb/Music/randoop-3.0.8/randoop-all-3.0.8.jar:/home/niteshb randoop.main.Main gentests --testclass=Tests

我收到错误

policy = sun.security.provider.PolicyFile@3d82c5f3
policy = sun.security.provider.PolicyFile@3d82c5f3
Ignoring non-visible class Tests specified via --classlist or --testclass.
No classes to test


Exiting Randoop.

不知道确切的问题是什么,字面上卡在这里..有人可以帮我解决这个问题:-

4

1 回答 1

0

You did not provide enough information to reproduce your problem (for example, the Tests.java file), but perhaps the problem is that the Tests class is not public. Try adding public to the class declaration.

于 2021-05-18T15:05:43.507 回答