我们正在使用EasyMock和PowerMock和JUnit。使用的覆盖工具是ECLEmma。使用EasyMock,它以绿色显示正确的覆盖范围(如图所示)。但是,对于使用PowerMock进行单元测试的代码,覆盖率显示为红色(未覆盖)。在网上看过类似的问题。但是,只是想检查是否有解决方案。
We are using EasyMock and PowerMock with JUnit. The coverage tool used is ECLEmma. With EasyMock, it shows the coverage properly in green (as covered). However, for the code that is unit tested with PowerMock, the coverage is shown in red (uncovered). Have read similar questions on the web. However, just wanted to check if there is a solution for this.
谢谢 Venkatesh
Thanks Venkatesh
推荐答案这是一个众所周知的问题: https:// github / jayway / powermock / issues / 422
It's a known problem : github/jayway/powermock/issues/422
它已经很长一段时间了,不会很快修复。
And it has been for a long time, it won't be fixed anytime soon.
我建议您改用 eCobertura 。
更多推荐
PowerMock ECLEmma覆盖问题
发布评论