Cobertura-report generation with maven plugin

Satyam Koyani

I did instrumentation of code and war file successfully deployed into the tomcat container.

I am running my client tests on it.After successful run of the tests on it when I am shutting down my tomcat instance there is Cobertura.ser file in the bin directory of tomcat.

Cobertura.ser file contains all the details of code-coverage file.

Now,I wants to configure a maven task to generate Cobertura html report from .ser file.

I read the help guide of Cobertura-maven-plugin but I couldn't get properly.

(I am not running junit tests but I am performing selenium tests).

<plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>cobertura-maven-plugin</artifactId>
                        <version>2.5.2</version>
                        <executions>
                            <execution>
                                <id>instrument-code</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>instrument</goal>
                                </goals>
                                <configuration>
                                    <attach>true</attach>
                                </configuration>
                            </execution>
                            <execution>
                                <id>generate-report</id>
                                <phase>prepare-package</phase>                                
                                <goals>
                                    <goal>cobertura</goal>
                                </goals>
                                <configuration>
                                    <dataFile>C:\Servers\apache-tomcat-8.0.11\bin\cobertura.ser</dataFile>
                                    <formats>
                                        <format>html</format>
                                        <format>xml</format>
                                    </formats>
                                    <outputDirectory>C:\Users\satyam\report</outputDirectory> 
                                </configuration>
                            </execution>
                        </executions>                        
                    </plugin>

This is my maven configuration of Cobertura-plugin but this way maven is not generating report from Cobertura.ser file located in tomcat bin directory.

Kalpesh Soni
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
 <formats>
   <format>html</format>
   <!-- format>xml</format -->
 </formats>
 </configuration>
 </plugin>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cobertura-report generation with maven plugin

From Dev

Maven - Deploy Cobertura Report to Confluence Wiki

From Dev

cobertura-maven-plugin with Java 8

From Dev

cobertura-maven-plugin conflicts with FindBugs

From Dev

Generating multiple Cobertura report formats via Maven command line

From Dev

Generating multiple Cobertura report formats via Maven command line

From Dev

Cobertura Maven Plugin fails with "The command line is too long" on Windows

From Dev

cobertura-maven-plugin cannot find my groovy source code

From Dev

How to generate xml report with scoverage maven plugin?

From Dev

maven jacoco plugin does not generate coverage report

From Dev

maven surefire report plugin not running the test cases

From Dev

Report not being generated with Maven-Surefire-Report plugin

From Dev

Why does Cobertura report 0% coverage when run through the Eclipse plugin?

From Dev

Skip a *test* with cobertura plugin

From Dev

Prevent test errors in 'mvn site' goal with ROME dependency and cobertura-maven-plugin

From Dev

Does cobertura maven plugin don't work with java8 Default Method declaration in interfaces?

From Dev

How do I know which goals of a maven plugin are report goals?

From Dev

Only include specific issues in maven-changes-plugin JIRA report

From Dev

How to get the icons for the resulted maven-surefire-report-plugin

From Dev

How to get the icons for the resulted maven-surefire-report-plugin

From Dev

How do I know which goals of a maven plugin are report goals?

From Dev

Report Generation inconsistant in protractor

From Dev

pytest html report generation

From Dev

Maven: Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version

From Dev

Istanbul: generate code cobertura report with mocha

From Dev

Cobertura code coverage report for jenkins pipeline jobs

From Dev

Automatic WSDL Java Stub generation in Eclipse Workspace using Apache CXF and CXF Maven Plugin

From Dev

JAXB 2 Maven plugin - Force java source generation, to use collection for child?

From Dev

maven-jaxb2-plugin class generation from xsd (Version Error)

Related Related

  1. 1

    Cobertura-report generation with maven plugin

  2. 2

    Maven - Deploy Cobertura Report to Confluence Wiki

  3. 3

    cobertura-maven-plugin with Java 8

  4. 4

    cobertura-maven-plugin conflicts with FindBugs

  5. 5

    Generating multiple Cobertura report formats via Maven command line

  6. 6

    Generating multiple Cobertura report formats via Maven command line

  7. 7

    Cobertura Maven Plugin fails with "The command line is too long" on Windows

  8. 8

    cobertura-maven-plugin cannot find my groovy source code

  9. 9

    How to generate xml report with scoverage maven plugin?

  10. 10

    maven jacoco plugin does not generate coverage report

  11. 11

    maven surefire report plugin not running the test cases

  12. 12

    Report not being generated with Maven-Surefire-Report plugin

  13. 13

    Why does Cobertura report 0% coverage when run through the Eclipse plugin?

  14. 14

    Skip a *test* with cobertura plugin

  15. 15

    Prevent test errors in 'mvn site' goal with ROME dependency and cobertura-maven-plugin

  16. 16

    Does cobertura maven plugin don't work with java8 Default Method declaration in interfaces?

  17. 17

    How do I know which goals of a maven plugin are report goals?

  18. 18

    Only include specific issues in maven-changes-plugin JIRA report

  19. 19

    How to get the icons for the resulted maven-surefire-report-plugin

  20. 20

    How to get the icons for the resulted maven-surefire-report-plugin

  21. 21

    How do I know which goals of a maven plugin are report goals?

  22. 22

    Report Generation inconsistant in protractor

  23. 23

    pytest html report generation

  24. 24

    Maven: Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version

  25. 25

    Istanbul: generate code cobertura report with mocha

  26. 26

    Cobertura code coverage report for jenkins pipeline jobs

  27. 27

    Automatic WSDL Java Stub generation in Eclipse Workspace using Apache CXF and CXF Maven Plugin

  28. 28

    JAXB 2 Maven plugin - Force java source generation, to use collection for child?

  29. 29

    maven-jaxb2-plugin class generation from xsd (Version Error)

HotTag

Archive