Running integration tests with Cobertura Maven plugin -
I have a problem getting the Cobertura plugin to run an integration test in Maven, the nearest answer to the question I received However, the problem is an open bug. I tried Steve's suggested configuration on 03 / April / 09, that does not work.
My POM
& lt; Reporting & gt; & Lt; Plugins & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.codehaus.mojo & lt; / Group & gt; & Lt; ArtifactId & gt; Cobertura-Maven-plugin & lt; / ArtifactId> & Lt; Version & gt; 2.3-snapshot and lt; / Edition & gt; & Lt; ReportSets & gt; & Lt; ReportSet & gt; & Lt; Reports & gt; & Lt; Report & gt; Cobertura integration & lt; / Report & gt; & Lt; / Reports & gt; & Lt; / ReportSet> & Lt; / ReportSets & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt; & Lt; / Reporting & gt;
Which is what is similar to the configuration piece provided by Steve.
From my opinion, the Cobertura maven plugin has two major disadvantages. In this no report is the goal , all unit tests will be run again as it ensures only to generate code coverage for unit tests
I am now using the Djoko maven plugin. Zako uses strong and / or unsuccessful safe reports to create a code coverage from the unit and / or integration test Also there is a good Jenkins integration in jacobo here An example is where Zako uses the unit tests and failure integration tests.
& lt; Build & gt; & Lt; Plugins & gt; & Lt ;! - Unit Testing - & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven- Perfect-plugin & lt; / ArtifactId> & Lt; Version & gt; 2.16 & lt; / Edition & gt; & Lt; / Plugin & gt; & Lt ;! - Integration testing - & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-fail Safe-plugin & lt; / ArtifactId> & Lt; Version & gt; 2.16 & lt; / Edition & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; Step & gt; Integration test & lt; / Step & gt; & Lt; Goals & gt; & Lt; Goal & gt; Integration test & lt; / Target & gt; & Lt; Goal & gt; Verified to & lt; / Target & gt; & Lt; / Targets & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt; & Lt ;! - Zako plugin prepares a report about the test coverage. Unlike the Cobertura plugin, jacobo can be configured to generate code coverage for integration testing. Another advantage of JaCoCo is that it only reports, Cobertura again performs all unit tests (beside the assured plugin) - & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.jacoco & lt; / Group & gt; & Lt; ArtifactId & gt; Jacoco-maven-plugin & lt; / ArtifactId> & Lt; Version & gt; 0.6.4.201312101107 & lt; / Edition & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; ID & gt; Jacoco-ready-agent & lt; / Id & gt; & Lt; Goals & gt; & Lt; Goal & gt; Ready-Agent & lt; / Target & gt; & Lt; / Targets & gt; & Lt; / Execution & gt; & Lt; Execution & gt; & Lt; ID & gt; Jacoco-ready-agent integration & lt; / Id & gt; & Lt; Goals & gt; & Lt; Goal & gt; Ready-Agent Integration & lt; / Target & gt; & Lt; / Targets & gt; & Lt; / Execution & gt; & Lt; Execution & gt; & Lt; ID & gt; Jacoco-report & lt; / Id & gt; & Lt; Goals & gt; & Lt; Goal & gt; Report & lt; / Target & gt; & Lt; / Targets & gt; & Lt; / Execution & gt; & Lt; Execution & gt; & Lt; ID & gt; Jacoco integration & lt; / Id & gt; & Lt; Goals & gt; & Lt; Goal & gt; Report Integration & lt; / Target & gt; & Lt; / Targets & gt; & Lt; / Execution & gt; & Lt; Execution & gt; & Lt; ID & gt; Check jacoco & lt; / Id & gt; & Lt; Goals & gt; & Lt; Goal & gt; Check & lt; / Target & gt; & Lt; / Targets & gt; & Lt; Configuration & gt; & Lt; Rules / & gt; & Lt; / Configuration & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt; & Lt; / Create & gt;
Comments
Post a Comment