EclEmma code coverage plugin and PowerMockRunner

前端 未结 4 1233
花落未央
花落未央 2021-01-18 20:46

I met a problem of using EclEmma plugin in Eclipse. It doesn\'t show code coverage when I use annotation @RunWith passing (PowerMockRunner.class) a

4条回答
  •  悲哀的现实
    2021-01-18 21:42

    EclEmma modifies bytecode to detect code coverage as PowerMock does to allow you to run an inaccessible code. Both changes are incompatible

    The solution is to use a runner offered by PowerMock which workaround that incompatibility

    http://www.notonlyanecmplace.com/make-eclemma-test-coverage-work-with-powermock/

提交回复
热议问题