Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-2392

Combining code coverage results of integration and unit tests for a module

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3
    • Component/s: Coverage & Tests
    • Labels:
      None
    • Environment:
      N/a - happens on all environments

      Description

      It would be excellent to have the integration tests for a component included along with the unit tests in the overall code coverage report for a module.

      For example, a typical Maven 2 project may be

      mycomponent
      mycomponent-integration-tests

      Sonar could generate the combined report for the mycomponent module in one of two ways:

      1. Run Cobertura on mycomponent unit tests with Cobertura - this will produce a cobertura.ser file in the mycomponent/target/cobertura directory.
      2. Run the mycomponent-integration-tests integration tests with Cobertura- this will produce a cobertura.ser file in the mycomponent-integration-tests/target/cobertura directory.
      3. Amalgamate the two cobertura.ser files
      4.Generate the code coverage report for the mycomponent module from the amalgamated cobertura.ser file.

      OR

      1. Run Cobertura on mycomponent unit tests with Cobertura - this will produce a cobertura.ser file in the mycomponent/target/cobertura directory.
      2. Run the mycomponent-integration-tests integration tests with Cobertura, having the results being written to the cobertura.ser file in mycomponent/target/cobertura
      3. Generate the code coverage report for the mycomponent module from the cobertura.ser in mycomponent/target/cobertura.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              freddy.mallet Freddy Mallet (Inactive)
              Reporter:
              hyperion Mik Quinlan
              Votes:
              96 Vote for this issue
              Watchers:
              77 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: