EclEmma code coverage plugin and PowerMockRunner

前端 未结 4 1257
花落未央
花落未央 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:28

    Powermock works well with Eclemma 1.5.3; but doesn't work with latest Eclemma 3.0.0 !!

    Eclipse - Kepler Service release 2 JUnit4 PowerMockito2 - 1.7.0. Eclemma 1.5.3

    The below given steps are working and I am able to see non-zero coverage % on running junit tests.

    1. Download eclemma-1.5.3.zip from http://www.eclemma.org/download.html
    2. Extract the contents to a local folder (eclemma-1.5.3)
    3. Add this path to Menu bar : Window -> Preferences -> Install/Update -> Available Software Sites
    4. Help -> Install New Software -> in "Work with" drop down, select the new entry (added in prev. step)
    5. Uncheck the check boxes one after another then the "Eclemma Coverage" plugin options will be shown. Eclemma Coverage option will be shown in selection window.
    6. Proceed to next and complete...

    Enjoy !!!

提交回复
热议问题