Coverage failed, but JUnits run is through

Swamy
2012-02-02
2013-05-09
  • Swamy
    Swamy
    2012-02-02

    Hi All,

    I am facing (i think) a peculiar issue while running code coverage from eclipse. The code coverage is failing when i do Coverage As -> JUnit Test. But the same JUnit tests when i just run as JUnits, it is going through and green. I am not able to understand what is the difference between Coverage As and Run As when i am running from the JUnit test class. I believe it should run in the same way except we get a report at the end of run in the case of coverage.

    Any help is much appreciated.

    Regards,
    Swamy.

     
  • Swamy
    Swamy
    2012-02-02

    Just to add more information, the failure i was talking about is happening in the JUnit methods with an AssertionFailedError. I meant the initialization is fine, but failing in the JUnits. To debug the issue, the same error is not happening when i run it in Debug (or Run) mode.

    What i wanted to check with you is that, is there any obvious issue here. If debugging is the only way, then how i can debug it as i am not facing any issue in the debug (or run) modes. Is there a way to debug it while running as code coverage? Another question is that like Run As, Debug As, Coverage As options, is there an option called "Debug Coverage As" or a similar option? Is there any plug-in to debug the coverage?

     
  • Does your question refer to the EclEmma Eclipse plugin? In this case you might better discuss this at the EclEmma help forum: https://sourceforge.net/projects/eclemma/forums/forum/614870

    In this case: What version of EclEmma are you using?

    Thanks,
    -marc

     
  • Swamy
    Swamy
    2012-02-08

    Thanks Marc.

    Regards,
    Swamy.