Topic
  • 2 replies
  • Latest Post - ‏2015-07-06T09:27:48Z by shu1
aschneid
aschneid
2 Posts

Pinned topic Code coverage problem RSA 8.5.5

‏2013-11-09T12:53:08Z |

Hi,

I have a problem in RSA 8.5.5 code coverage, where two out of my classes in the package are listed as coverage 0 (no coverage

at all), whereas they are used in the unit tests [see attached picture]. This then causes the overall report to show an incorrect value.

Is there any limit or thing I can check? When running a limited unit test (not all tests, but ones that use the classes) - their

coverage is included. - I'm puzzled and have no more clue what the problem could be....

Regards,

Achim

Attachments

  • aschneid
    aschneid
    2 Posts

    Re: Code coverage problem RSA 8.5.5

    ‏2014-01-04T00:25:09Z  

    After installing RSA 9.0.0.1 and upgrade to JMockit 1.6 over the last days, I still get the same error/problem as before: The code coverage information is set to 0 (zero) even though it executed the code. 

    Meanwhile I'm now able to somehow "trigger" the effect by adding or removing a junit testcase file - but still have no clue how to get around it. When leaving out the additional test file - and I tried several different ones - the coverage information is available (~96%). If its in, then coverage is 0%. IMHO it cannot have a relation to my code.

    Is there any known limit in coverage or junit tests? it looks to me as if the 25 testcase is triggering it - but this CANNOT be true (I hope)

    Can someone help here?

    Regards,
    Achim

  • shu1
    shu1
    13 Posts

    Re: Code coverage problem RSA 8.5.5

    ‏2015-07-06T09:27:48Z  
    • aschneid
    • ‏2014-01-04T00:25:09Z

    After installing RSA 9.0.0.1 and upgrade to JMockit 1.6 over the last days, I still get the same error/problem as before: The code coverage information is set to 0 (zero) even though it executed the code. 

    Meanwhile I'm now able to somehow "trigger" the effect by adding or removing a junit testcase file - but still have no clue how to get around it. When leaving out the additional test file - and I tried several different ones - the coverage information is available (~96%). If its in, then coverage is 0%. IMHO it cannot have a relation to my code.

    Is there any known limit in coverage or junit tests? it looks to me as if the 25 testcase is triggering it - but this CANNOT be true (I hope)

    Can someone help here?

    Regards,
    Achim

    Hi.

     

    I just got the same problem (coverage report shows 0% , even thought the code was run actually...) and I finally figured out the cause of the problem.

     

    For me, the problem is caused by the size of a method I want to collect the coverage, and  reducing the size of the method using refactoring (extract lines of code as another method) solves the problem.



    My code was a large one method code, and after the RAD Code Coverage embeds byte code (for collecting the coverage info.) by using Byte Code Instrumentation (BCI), it supposed to exceed 64 KB limit, which is the limitation of the Java spec, then the BCI silently ignores the probing code (not modify the byte code for the tested class), and  does not produced the collect coverage data (so it reported 0% coverage).

     

    I'm not sure your case matches the situation, and its too late anyway, however , I would like to share the problem and solution, for future practitioners.

     

    Hope this helps, anyone in any future.

    shu1.