Uploaded image for project: 'Application Controller'
  1. Application Controller
  2. APPC-248

Missing code coverage due to compatibility issue between Jacoco and PowerMockue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Low Low
    • Beijing Release
    • Amsterdam Release
    • APPC
    • None

       

      The missing code coverage is caused by compatibility issue between PowerMock and Jacoco.

      The issues is that Jacoco does not like PowerMock instrumentation

      Here is a detail explanation: 

      https://github.com/powermock/powermock/wiki/Code-coverage-with-JaCoCo

       

       

      To reproduce the problem,  pick any project that has a junit which uses PowerMock.  Run the following  mvn commands to generate the issue: 

      mvn clean install

      mvn verify

       

      you should see the WARNING in the logs

      [INFO] — jacoco-maven-plugin:0.7.2.201409121644:report (post-unit-test) @ appc-dg-util-bundle —

      [INFO] Analyzed bundle 'APPC DG Util - Bundle' with 4 classes

      [WARNING] Classes in bundle 'APPC DG Util - Bundle' do no match with execution data. For report generation the same class files must be used as at runtime.

      [WARNING] Execution data for class org/openecomp/appc/dg/util/impl/ExecuteNodeActionImpl does not match.

      [INFO] 

            takamune_cho takamune_cho
            jsulliva jsulliva
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: