为什么EclEmma不使用@RunWith(PowerMockRunner.class)进行测试覆盖代码 [英] Why EclEmma doesn't coverage code with tests with @RunWith(PowerMockRunner.class)

查看:253
本文介绍了为什么EclEmma不使用@RunWith(PowerMockRunner.class)进行测试覆盖代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将EclEmma与Eclipse结合使用,以帮助我知道项目中缺少哪些代码测试,但是所有未调用@RunWith(PowerMockRunner.class)的测试均未调用,因此未进行测试.

I am using EclEmma with Eclipse to help me to know where is missing code tests in my project, but all tests with @RunWith(PowerMockRunner.class) are not called and thus not tested.

我在Mockito中使用JUnit 4.8.1.

I´m using JUnit 4.8.1 with Mockito.

那会是什么?

推荐答案

已为双方报告了一个已知的错误:

Its a known bug reported for both parties:

http://code.google.com/p/powermock/问题/详细信息?id = 402 https://github.com/jacoco/eclemma/issues/15#issuecomment-9565210

eCoberture 似乎提供了正确的覆盖范围.唯一的问题是,似乎不再需要维护它了,并且您无法删除Eclipse Juno中的亮点.

eCoberture seems however to provide correct coverage. The only problem, that it seems not to be maintained anymore, and you cannot remove the highlights im Eclipse Juno.

这篇关于为什么EclEmma不使用@RunWith(PowerMockRunner.class)进行测试覆盖代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆