现在我想将junit基准添加到我已经存在的junit测试类中。我使用junit 4.10。我添加了junit基准0.7.2。当我尝试运行测试类时,它显示java.lang.Exception: Field benchmarkRun必须实现MethodRule。如何解决这个问题?我认为JUnit4.10会将MethodRule作为弃用。
发布于 2014-04-24 08:44:05
对我来说,它在JUnit4.11上工作得很好。我不得不从类路径中删除com.springsoure.org.junit-4.7.0.jar。因此,请确保您的类路径中没有任何旧版本的Junit相关jars。
https://stackoverflow.com/questions/23242915
复制