Quantcast

IT test coverage is 0% using Jacoco in SONAR

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

IT test coverage is 0% using Jacoco in SONAR

g.abcdefg
This post was updated on .
I am using:
SONAR v.3.2 (it has jacoco)
Maven 3.0.4

Followed "http://johndobie.blogspot.in/2012/05/easy-unit-and-integration-code-coverage.html#comment-form" to get separate code coverage for unit & IT tests. But IT test coverage is shown as 0%.
It is generating separate jacoco-unit.exec (44kb) & jacoco-it.exec (14kb), but coverage is only shown for unit tests on SONAR.

Logs shows as:
[INFO] [13:10:23.515] Sensor SquidSensor done: 9437 ms
[INFO] [13:10:23.515] Sensor JaCoCoSensor...
[INFO] [13:10:23.578] Analysing D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-unit.exec
[INFO] [13:10:30.390] Sensor JaCoCoSensor done: 6875 ms
[INFO] [13:10:30.390] Sensor JaCoCoItSensor...
[INFO] [13:10:30.390] Analysing D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-it.exec
[INFO] [13:10:30.469] Sensor JaCoCoItSensor done: 79 ms
[INFO] [13:10:30.484] Sensor SurefireSensor...
[INFO] [13:10:30.484] parsing D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\surefire-reports
[INFO] [13:10:30.828] Sensor SurefireSensor done: 344 ms
[INFO] [13:10:30.828] Sensor CpdSensor...
[INFO] [13:10:30.828] SonarEngine is used
[INFO] [13:10:30.844] Cross-project analysis disabled
[INFO] [13:10:32.312] Sensor CpdSensor done: 1484 ms
[INFO] [13:10:32.312] Sensor CheckstyleSensor...


POM file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.csr.lts</groupId>
  <artifactId>lts-webapp</artifactId>
  <packaging>war</packaging>
  <name>LTS Webapp</name>
  <url>http://maven.apache.org</url>
   <parent>
    <groupId>com.csr</groupId>
    <artifactId>lts</artifactId>
    <version>0.1-SNAPSHOT</version>
  </parent>

 <properties>
          <coverage.reports.dir>${basedir}/target/coverage-reports</coverage.reports.dir>
                <sonar.jacoco.reportPath>${coverage.reports.dir}/jacoco-unit.exec</sonar.jacoco.reportPath>
                <sonar.jacoco.itReportPath>${coverage.reports.dir}/jacoco-it.exec</sonar.jacoco.itReportPath>
                <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
                <sonar.jacoco.jar>${basedir}/lib/org.jacoco.agent-0.5.10.201208310627-runtime.jar</sonar.jacoco.jar>
</properties>

  <build>
    <finalName>lts</finalName>

<plugins>
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12.3</version>
        <dependencies>
         <dependency>
          <groupId>org.apache.maven.surefire</groupId>
          <artifactId>surefire-junit47</artifactId>
          <version>2.12</version>
         </dependency>
        </dependencies>
        <configuration>
                <argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.reportPath},append=false,includes=com.*</argLine>
         <includes>
                 <include>**/*Test.java</include>
                <include>**/Test*.java</include>
         </includes>
          <excludes>
          <exclude>**/IT*.java</exclude>     
          </excludes>
        </configuration>
        </plugin>

<plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
         <version>2.12.3</version>
         <dependencies>
          <dependency>
           <groupId>org.apache.maven.surefire</groupId>
           <artifactId>surefire-junit47</artifactId>
           <version>2.12</version>
          </dependency>
         </dependencies>
       
         <executions>
          <execution>
           <goals>
                        <goal>integration-test</goal>
           </goals>
           <configuration>
                   <argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.itReportPath},append=false,includes=com.*</argLine>
           <includes>
               <include>**/IT*.java</include>
             </includes>
           </configuration>
          </execution>
         </executions>
        </plugin>
</plugins>
  </build>
</project>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IT test coverage is 0% using Jacoco in SONAR

Freddy Mallet
Hello, 

Everything seems to be configured correctly and so should work. Could you provide a simple Maven project to help us reproduce this issue locally ?

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Fri, Sep 14, 2012 at 12:22 PM, g.abcdefg <[hidden email]> wrote:
I am using:
SONAR v.3.2 (it has jacoco)
Maven 3.0.4

Followed
"http://johndobie.blogspot.in/2012/05/easy-unit-and-integration-code-coverage.html#comment-form"
to get separate code coverage for unit & IT tests. But IT test coverage is
shown as 0%.
It is generating separate jacoco-unit.exec (44kb) & jacoco-it.exec (14kb),
but coverage is only shown for unit tests on SONAR.

Logs shows as:
[INFO] [13:10:23.515] Sensor SquidSensor done: 9437 ms
[INFO] [13:10:23.515] Sensor JaCoCoSensor...
[INFO] [13:10:23.578] Analysing
D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-unit.exec
[INFO] [13:10:30.390] Sensor JaCoCoSensor done: 6875 ms
[INFO] [13:10:30.390] Sensor JaCoCoItSensor...
[INFO] [13:10:30.390] Analysing
D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-it.exec
[INFO] [13:10:30.469] Sensor JaCoCoItSensor done: 79 ms
[INFO] [13:10:30.484] Sensor SurefireSensor...
[INFO] [13:10:30.484] parsing
D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\surefire-reports
[INFO] [13:10:30.828] Sensor SurefireSensor done: 344 ms
[INFO] [13:10:30.828] Sensor CpdSensor...
[INFO] [13:10:30.828] SonarEngine is used
[INFO] [13:10:30.844] Cross-project analysis disabled
[INFO] [13:10:32.312] Sensor CpdSensor done: 1484 ms
[INFO] [13:10:32.312] Sensor CheckstyleSensor...


POM file:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.csr.lts</groupId>
  <artifactId>lts-webapp</artifactId>
  <packaging>war</packaging>
  <name>LTS Webapp</name>
  <url>http://maven.apache.org</url>
   <parent>
    <groupId>com.csr</groupId>
    <artifactId>lts</artifactId>
    <version>0.1-SNAPSHOT</version>
  </parent>

 <properties>

<coverage.reports.dir>${basedir}/target/coverage-reports</coverage.reports.dir>

<sonar.jacoco.reportPath>${coverage.reports.dir}/jacoco-unit.exec</sonar.jacoco.reportPath>

<sonar.jacoco.itReportPath>${coverage.reports.dir}/jacoco-it.exec</sonar.jacoco.itReportPath>
                <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>

<sonar.jacoco.jar>${basedir}/lib/org.jacoco.agent-0.5.10.201208310627-runtime.jar</sonar.jacoco.jar>
</properties>

  <build>
    <finalName>lts</finalName>

<plugins>


<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12.3</version>
        <dependencies>
         <dependency>
          <groupId>org.apache.maven.surefire</groupId>
          <artifactId>surefire-junit47</artifactId>
          <version>2.12</version>
         </dependency>
        </dependencies>
        <configuration>

<argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.reportPath},append=false,includes=com.*</argLine>
         <includes>
                 <include>**/*Test.java</include>
                <include>**/Test*.java</include>
         </includes>
          <excludes>
          <exclude>**/IT*.java</exclude>
          </excludes>
        </configuration>
        </plugin>

<plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
         <version>2.12.3</version>
         <dependencies>
          <dependency>
           <groupId>org.apache.maven.surefire</groupId>
           <artifactId>surefire-junit47</artifactId>
           <version>2.12</version>
          </dependency>
         </dependencies>

         <executions>
          <execution>
           <goals>
                        <goal>integration-test</goal>
           </goals>
           <configuration>

<argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.itReportPath},append=false,includes=com.*</argLine>
           <includes>
               <include>**/IT*.java</include>
             </includes>
           </configuration>
          </execution>
         </executions>
        </plugin>
</plugins>
  </build>
</project>




--
View this message in context: http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IT test coverage is 0% using Jacoco in SONAR

g.abcdefg
Hi Freddy,

Thanks a lot.
I will send a sample project by Monday.

Regards,
Pankaj

On Wed, Sep 19, 2012 at 2:04 PM, Freddy Mallet [via Sonar] <[hidden email]> wrote:
Hello, 

Everything seems to be configured correctly and so should work. Could you provide a simple Maven project to help us reproduce this issue locally ?

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Fri, Sep 14, 2012 at 12:22 PM, g.abcdefg <[hidden email]> wrote:
I am using:
SONAR v.3.2 (it has jacoco)
Maven 3.0.4

Followed
"http://johndobie.blogspot.in/2012/05/easy-unit-and-integration-code-coverage.html#comment-form"
to get separate code coverage for unit & IT tests. But IT test coverage is
shown as 0%.
It is generating separate jacoco-unit.exec (44kb) & jacoco-it.exec (14kb),
but coverage is only shown for unit tests on SONAR.

Logs shows as:
[INFO] [13:10:23.515] Sensor SquidSensor done: 9437 ms
[INFO] [13:10:23.515] Sensor JaCoCoSensor...
[INFO] [13:10:23.578] Analysing
D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-unit.exec
[INFO] [13:10:30.390] Sensor JaCoCoSensor done: 6875 ms
[INFO] [13:10:30.390] Sensor JaCoCoItSensor...
[INFO] [13:10:30.390] Analysing
D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-it.exec
[INFO] [13:10:30.469] Sensor JaCoCoItSensor done: 79 ms
[INFO] [13:10:30.484] Sensor SurefireSensor...
[INFO] [13:10:30.484] parsing
D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\surefire-reports
[INFO] [13:10:30.828] Sensor SurefireSensor done: 344 ms
[INFO] [13:10:30.828] Sensor CpdSensor...
[INFO] [13:10:30.828] SonarEngine is used
[INFO] [13:10:30.844] Cross-project analysis disabled
[INFO] [13:10:32.312] Sensor CpdSensor done: 1484 ms
[INFO] [13:10:32.312] Sensor CheckstyleSensor...


POM file:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.csr.lts</groupId>
  <artifactId>lts-webapp</artifactId>
  <packaging>war</packaging>
  <name>LTS Webapp</name>
  <url>http://maven.apache.org</url>
   <parent>
    <groupId>com.csr</groupId>
    <artifactId>lts</artifactId>
    <version>0.1-SNAPSHOT</version>
  </parent>

 <properties>

<coverage.reports.dir>${basedir}/target/coverage-reports</coverage.reports.dir>

<sonar.jacoco.reportPath>${coverage.reports.dir}/jacoco-unit.exec</sonar.jacoco.reportPath>

<sonar.jacoco.itReportPath>${coverage.reports.dir}/jacoco-it.exec</sonar.jacoco.itReportPath>
                <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>

<sonar.jacoco.jar>${basedir}/lib/org.jacoco.agent-0.5.10.201208310627-runtime.jar</sonar.jacoco.jar>
</properties>

  <build>
    <finalName>lts</finalName>

<plugins>


<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12.3</version>
        <dependencies>
         <dependency>
          <groupId>org.apache.maven.surefire</groupId>
          <artifactId>surefire-junit47</artifactId>
          <version>2.12</version>
         </dependency>
        </dependencies>
        <configuration>

<argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.reportPath},append=false,includes=com.*</argLine>
         <includes>
                 <include>**/*Test.java</include>
                <include>**/Test*.java</include>
         </includes>
          <excludes>
          <exclude>**/IT*.java</exclude>
          </excludes>
        </configuration>
        </plugin>

<plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
         <version>2.12.3</version>
         <dependencies>
          <dependency>
           <groupId>org.apache.maven.surefire</groupId>
           <artifactId>surefire-junit47</artifactId>
           <version>2.12</version>
          </dependency>
         </dependencies>

         <executions>
          <execution>
           <goals>
                        <goal>integration-test</goal>
           </goals>
           <configuration>

<argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.itReportPath},append=false,includes=com.*</argLine>
           <includes>
               <include>**/IT*.java</include>
             </includes>
           </configuration>
          </execution>
         </executions>
        </plugin>
</plugins>
  </build>
</project>




--
View this message in context: http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






If you reply to this email, your message will be added to the discussion below:
http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051p5003235.html
To unsubscribe from IT test coverage is 0% using Jacoco in SONAR, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IT test coverage is 0% using Jacoco in SONAR

g.abcdefg
In reply to this post by Freddy Mallet
Hi Freddy,

Please find attach a sample Maven project.
Hoping that, issue get reproduce with this.

Regards,
Pankaj


On Fri, Sep 21, 2012 at 3:33 PM, pankaj sharma <[hidden email]> wrote:
Hi Freddy,

Thanks a lot.
I will send a sample project by Monday.

Regards,
Pankaj


On Wed, Sep 19, 2012 at 2:04 PM, Freddy Mallet [via Sonar] <[hidden email]> wrote:
Hello, 

Everything seems to be configured correctly and so should work. Could you provide a simple Maven project to help us reproduce this issue locally ?

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Fri, Sep 14, 2012 at 12:22 PM, g.abcdefg <[hidden email]> wrote:
I am using:
SONAR v.3.2 (it has jacoco)
Maven 3.0.4

Followed
"http://johndobie.blogspot.in/2012/05/easy-unit-and-integration-code-coverage.html#comment-form"
to get separate code coverage for unit & IT tests. But IT test coverage is
shown as 0%.
It is generating separate jacoco-unit.exec (44kb) & jacoco-it.exec (14kb),
but coverage is only shown for unit tests on SONAR.

Logs shows as:
[INFO] [13:10:23.515] Sensor SquidSensor done: 9437 ms
[INFO] [13:10:23.515] Sensor JaCoCoSensor...
[INFO] [13:10:23.578] Analysing
D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-unit.exec
[INFO] [13:10:30.390] Sensor JaCoCoSensor done: 6875 ms
[INFO] [13:10:30.390] Sensor JaCoCoItSensor...
[INFO] [13:10:30.390] Analysing
D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-it.exec
[INFO] [13:10:30.469] Sensor JaCoCoItSensor done: 79 ms
[INFO] [13:10:30.484] Sensor SurefireSensor...
[INFO] [13:10:30.484] parsing
D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\surefire-reports
[INFO] [13:10:30.828] Sensor SurefireSensor done: 344 ms
[INFO] [13:10:30.828] Sensor CpdSensor...
[INFO] [13:10:30.828] SonarEngine is used
[INFO] [13:10:30.844] Cross-project analysis disabled
[INFO] [13:10:32.312] Sensor CpdSensor done: 1484 ms
[INFO] [13:10:32.312] Sensor CheckstyleSensor...


POM file:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.csr.lts</groupId>
  <artifactId>lts-webapp</artifactId>
  <packaging>war</packaging>
  <name>LTS Webapp</name>
  <url>http://maven.apache.org</url>
   <parent>
    <groupId>com.csr</groupId>
    <artifactId>lts</artifactId>
    <version>0.1-SNAPSHOT</version>
  </parent>

 <properties>

<coverage.reports.dir>${basedir}/target/coverage-reports</coverage.reports.dir>

<sonar.jacoco.reportPath>${coverage.reports.dir}/jacoco-unit.exec</sonar.jacoco.reportPath>

<sonar.jacoco.itReportPath>${coverage.reports.dir}/jacoco-it.exec</sonar.jacoco.itReportPath>
                <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>

<sonar.jacoco.jar>${basedir}/lib/org.jacoco.agent-0.5.10.201208310627-runtime.jar</sonar.jacoco.jar>
</properties>

  <build>
    <finalName>lts</finalName>

<plugins>


<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12.3</version>
        <dependencies>
         <dependency>
          <groupId>org.apache.maven.surefire</groupId>
          <artifactId>surefire-junit47</artifactId>
          <version>2.12</version>
         </dependency>
        </dependencies>
        <configuration>

<argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.reportPath},append=false,includes=com.*</argLine>
         <includes>
                 <include>**/*Test.java</include>
                <include>**/Test*.java</include>
         </includes>
          <excludes>
          <exclude>**/IT*.java</exclude>
          </excludes>
        </configuration>
        </plugin>

<plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
         <version>2.12.3</version>
         <dependencies>
          <dependency>
           <groupId>org.apache.maven.surefire</groupId>
           <artifactId>surefire-junit47</artifactId>
           <version>2.12</version>
          </dependency>
         </dependencies>

         <executions>
          <execution>
           <goals>
                        <goal>integration-test</goal>
           </goals>
           <configuration>

<argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.itReportPath},append=false,includes=com.*</argLine>
           <includes>
               <include>**/IT*.java</include>
             </includes>
           </configuration>
          </execution>
         </executions>
        </plugin>
</plugins>
  </build>
</project>




--
View this message in context: http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






If you reply to this email, your message will be added to the discussion below:
http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051p5003235.html
To unsubscribe from IT test coverage is 0% using Jacoco in SONAR, click here.
NAML



lts.zip (18M) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IT test coverage is 0% using Jacoco in SONAR

Freddy Mallet
I'm sorry Pankaj but I don't manage to play locally with the provided sample maven project as there is missing dependency on testlink.client:testlink.api.java.client:jar:2.0.

Kind regards,
Freddy
-
Sonar for Continuous Inspection



On Mon, Sep 24, 2012 at 4:13 PM, g.abcdefg <[hidden email]> wrote:
Hi Freddy,

Please find attach a sample Maven project.
Hoping that, issue get reproduce with this.

Regards,
Pankaj


On Fri, Sep 21, 2012 at 3:33 PM, pankaj sharma <[hidden email]> wrote:

> Hi Freddy,
>
> Thanks a lot.
> I will send a sample project by Monday.
>
> Regards,
> Pankaj
>
>
> On Wed, Sep 19, 2012 at 2:04 PM, Freddy Mallet [via Sonar] <
> [hidden email]> wrote:
>
>> Hello,
>>
>> Everything seems to be configured correctly and so should work. Could you
>> provide a simple Maven project to help us reproduce this issue locally ?
>>
>> Thanks
>> Freddy
>> -----
>> twitter.com/FreddyMallet
>> Sonar for Continuous Inspection
>>
>>
>>
>> On Fri, Sep 14, 2012 at 12:22 PM, g.abcdefg <[hidden email]<http://user/SendEmail.jtp?type=node&node=5003235&i=0>
>> > wrote:
>>
>>> I am using:
>>> SONAR v.3.2 (it has jacoco)
>>> Maven 3.0.4
>>>
>>> Followed
>>> "
>>> http://johndobie.blogspot.in/2012/05/easy-unit-and-integration-code-coverage.html#comment-form
>>> "
>>> to get separate code coverage for unit & IT tests. But IT test coverage
>>> is
>>> shown as 0%.
>>> It is generating separate jacoco-unit.exec (44kb) & jacoco-it.exec
>>> (14kb),
>>> but coverage is only shown for unit tests on SONAR.
>>>
>>> Logs shows as:
>>> [INFO] [13:10:23.515] Sensor SquidSensor done: 9437 ms
>>> [INFO] [13:10:23.515] Sensor JaCoCoSensor...
>>> [INFO] [13:10:23.578] Analysing
>>>
>>> D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-unit.exec
>>> [INFO] [13:10:30.390] Sensor JaCoCoSensor done: 6875 ms
>>> [INFO] [13:10:30.390] Sensor JaCoCoItSensor...
>>> [INFO] [13:10:30.390] Analysing
>>>
>>> D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-it.exec
>>> [INFO] [13:10:30.469] Sensor JaCoCoItSensor done: 79 ms
>>> [INFO] [13:10:30.484] Sensor SurefireSensor...
>>> [INFO] [13:10:30.484] parsing
>>>
>>> D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\surefire-reports
>>> [INFO] [13:10:30.828] Sensor SurefireSensor done: 344 ms
>>> [INFO] [13:10:30.828] Sensor CpdSensor...
>>> [INFO] [13:10:30.828] SonarEngine is used
>>> [INFO] [13:10:30.844] Cross-project analysis disabled
>>> [INFO] [13:10:32.312] Sensor CpdSensor done: 1484 ms
>>> [INFO] [13:10:32.312] Sensor CheckstyleSensor...
>>>
>>>
>>> POM file:
>>> <project xmlns="http://maven.apache.org/POM/4.0.0"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>> http://maven.apache.org/maven-v4_0_0.xsd">
>>>   <modelVersion>4.0.0</modelVersion>
>>>   <groupId>com.csr.lts</groupId>
>>>   <artifactId>lts-webapp</artifactId>
>>>   <packaging>war</packaging>
>>>   <name>LTS Webapp</name>
>>>   <url>http://maven.apache.org</url>
>>>    <parent>
>>>     <groupId>com.csr</groupId>
>>>     <artifactId>lts</artifactId>
>>>     <version>0.1-SNAPSHOT</version>
>>>   </parent>
>>>
>>>  <properties>
>>>
>>>
>>> <coverage.reports.dir>${basedir}/target/coverage-reports</coverage.reports.dir>
>>>
>>>
>>> <sonar.jacoco.reportPath>${coverage.reports.dir}/jacoco-unit.exec</sonar.jacoco.reportPath>
>>>
>>>
>>> <sonar.jacoco.itReportPath>${coverage.reports.dir}/jacoco-it.exec</sonar.jacoco.itReportPath>
>>>
>>> <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
>>>
>>>
>>> <sonar.jacoco.jar>${basedir}/lib/org.jacoco.agent-0.5.10.201208310627-runtime.jar</sonar.jacoco.jar>
>>> </properties>
>>>
>>>   <build>
>>>     <finalName>lts</finalName>
>>>
>>> <plugins>
>>>
>>>
>>> <plugin>
>>>         <groupId>org.apache.maven.plugins</groupId>
>>>         <artifactId>maven-surefire-plugin</artifactId>
>>>         <version>2.12.3</version>
>>>         <dependencies>
>>>          <dependency>
>>>           <groupId>org.apache.maven.surefire</groupId>
>>>           <artifactId>surefire-junit47</artifactId>
>>>           <version>2.12</version>
>>>          </dependency>
>>>         </dependencies>
>>>         <configuration>
>>>
>>>
>>> <argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.reportPath},append=false,includes=com.*</argLine>
>>>          <includes>
>>>                  <include>**/*Test.java</include>
>>>                 <include>**/Test*.java</include>
>>>          </includes>
>>>           <excludes>
>>>           <exclude>**/IT*.java</exclude>
>>>           </excludes>
>>>         </configuration>
>>>         </plugin>
>>>
>>> <plugin>
>>>          <groupId>org.apache.maven.plugins</groupId>
>>>          <artifactId>maven-failsafe-plugin</artifactId>
>>>          <version>2.12.3</version>
>>>          <dependencies>
>>>           <dependency>
>>>            <groupId>org.apache.maven.surefire</groupId>
>>>            <artifactId>surefire-junit47</artifactId>
>>>            <version>2.12</version>
>>>           </dependency>
>>>          </dependencies>
>>>
>>>          <executions>
>>>           <execution>
>>>            <goals>
>>>                         <goal>integration-test</goal>
>>>            </goals>
>>>            <configuration>
>>>
>>>
>>> <argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.itReportPath},append=false,includes=com.*</argLine>
>>>            <includes>
>>>                <include>**/IT*.java</include>
>>>              </includes>
>>>            </configuration>
>>>           </execution>
>>>          </executions>
>>>         </plugin>
>>> </plugins>
>>>   </build>
>>> </project>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051.html
>>> Sent from the Sonar user mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>     http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>>
lts.zip (18M) <http://sonar.15.n6.nabble.com/attachment/5003421/0/lts.zip>




--
View this message in context: http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051p5003421.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IT test coverage is 0% using Jacoco in SONAR

g.abcdefg
It's not needed for sample project. We can remove it for now.
I missed removing it while creating sample.

Regards,
Pankaj

On Thu, Sep 27, 2012 at 7:00 PM, Freddy Mallet [via Sonar] <[hidden email]> wrote:
I'm sorry Pankaj but I don't manage to play locally with the provided sample maven project as there is missing dependency on testlink.client:testlink.api.java.client:jar:2.0.

Kind regards,
Freddy
-
Sonar for Continuous Inspection



On Mon, Sep 24, 2012 at 4:13 PM, g.abcdefg <[hidden email]> wrote:
Hi Freddy,

Please find attach a sample Maven project.
Hoping that, issue get reproduce with this.

Regards,
Pankaj


On Fri, Sep 21, 2012 at 3:33 PM, pankaj sharma <[hidden email]> wrote:

> Hi Freddy,
>
> Thanks a lot.
> I will send a sample project by Monday.
>
> Regards,
> Pankaj
>
>
> On Wed, Sep 19, 2012 at 2:04 PM, Freddy Mallet [via Sonar] <
> [hidden email]> wrote:
>
>> Hello,
>>
>> Everything seems to be configured correctly and so should work. Could you
>> provide a simple Maven project to help us reproduce this issue locally ?
>>
>> Thanks
>> Freddy
>> -----
>> twitter.com/FreddyMallet
>> Sonar for Continuous Inspection
>>
>>
>>
>> On Fri, Sep 14, 2012 at 12:22 PM, g.abcdefg <[hidden email]<http://user/SendEmail.jtp?type=node&node=5003235&i=0>

>> > wrote:
>>
>>> I am using:
>>> SONAR v.3.2 (it has jacoco)
>>> Maven 3.0.4
>>>
>>> Followed
>>> "
>>> http://johndobie.blogspot.in/2012/05/easy-unit-and-integration-code-coverage.html#comment-form
>>> "
>>> to get separate code coverage for unit & IT tests. But IT test coverage
>>> is
>>> shown as 0%.
>>> It is generating separate jacoco-unit.exec (44kb) & jacoco-it.exec
>>> (14kb),
>>> but coverage is only shown for unit tests on SONAR.
>>>
>>> Logs shows as:
>>> [INFO] [13:10:23.515] Sensor SquidSensor done: 9437 ms
>>> [INFO] [13:10:23.515] Sensor JaCoCoSensor...
>>> [INFO] [13:10:23.578] Analysing
>>>
>>> D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-unit.exec
>>> [INFO] [13:10:30.390] Sensor JaCoCoSensor done: 6875 ms
>>> [INFO] [13:10:30.390] Sensor JaCoCoItSensor...
>>> [INFO] [13:10:30.390] Analysing
>>>
>>> D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-it.exec
>>> [INFO] [13:10:30.469] Sensor JaCoCoItSensor done: 79 ms
>>> [INFO] [13:10:30.484] Sensor SurefireSensor...
>>> [INFO] [13:10:30.484] parsing
>>>
>>> D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\surefire-reports
>>> [INFO] [13:10:30.828] Sensor SurefireSensor done: 344 ms
>>> [INFO] [13:10:30.828] Sensor CpdSensor...
>>> [INFO] [13:10:30.828] SonarEngine is used
>>> [INFO] [13:10:30.844] Cross-project analysis disabled
>>> [INFO] [13:10:32.312] Sensor CpdSensor done: 1484 ms
>>> [INFO] [13:10:32.312] Sensor CheckstyleSensor...
>>>
>>>
>>> POM file:
>>> <project xmlns="http://maven.apache.org/POM/4.0.0"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>> http://maven.apache.org/maven-v4_0_0.xsd">
>>>   <modelVersion>4.0.0</modelVersion>
>>>   <groupId>com.csr.lts</groupId>
>>>   <artifactId>lts-webapp</artifactId>
>>>   <packaging>war</packaging>
>>>   <name>LTS Webapp</name>
>>>   <url>http://maven.apache.org</url>
>>>    <parent>
>>>     <groupId>com.csr</groupId>
>>>     <artifactId>lts</artifactId>
>>>     <version>0.1-SNAPSHOT</version>
>>>   </parent>
>>>
>>>  <properties>
>>>
>>>
>>> <coverage.reports.dir>${basedir}/target/coverage-reports</coverage.reports.dir>
>>>
>>>
>>> <sonar.jacoco.reportPath>${coverage.reports.dir}/jacoco-unit.exec</sonar.jacoco.reportPath>
>>>
>>>
>>> <sonar.jacoco.itReportPath>${coverage.reports.dir}/jacoco-it.exec</sonar.jacoco.itReportPath>
>>>
>>> <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
>>>
>>>
>>> <sonar.jacoco.jar>${basedir}/lib/org.jacoco.agent-0.5.10.201208310627-runtime.jar</sonar.jacoco.jar>
>>> </properties>
>>>
>>>   <build>
>>>     <finalName>lts</finalName>
>>>
>>> <plugins>
>>>
>>>
>>> <plugin>
>>>         <groupId>org.apache.maven.plugins</groupId>
>>>         <artifactId>maven-surefire-plugin</artifactId>
>>>         <version>2.12.3</version>
>>>         <dependencies>
>>>          <dependency>
>>>           <groupId>org.apache.maven.surefire</groupId>
>>>           <artifactId>surefire-junit47</artifactId>
>>>           <version>2.12</version>
>>>          </dependency>
>>>         </dependencies>
>>>         <configuration>
>>>
>>>
>>> <argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.reportPath},append=false,includes=com.*</argLine>
>>>          <includes>
>>>                  <include>**/*Test.java</include>
>>>                 <include>**/Test*.java</include>
>>>          </includes>
>>>           <excludes>
>>>           <exclude>**/IT*.java</exclude>
>>>           </excludes>
>>>         </configuration>
>>>         </plugin>
>>>
>>> <plugin>
>>>          <groupId>org.apache.maven.plugins</groupId>
>>>          <artifactId>maven-failsafe-plugin</artifactId>
>>>          <version>2.12.3</version>
>>>          <dependencies>
>>>           <dependency>
>>>            <groupId>org.apache.maven.surefire</groupId>
>>>            <artifactId>surefire-junit47</artifactId>
>>>            <version>2.12</version>
>>>           </dependency>
>>>          </dependencies>
>>>
>>>          <executions>
>>>           <execution>
>>>            <goals>
>>>                         <goal>integration-test</goal>
>>>            </goals>
>>>            <configuration>
>>>
>>>
>>> <argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.itReportPath},append=false,includes=com.*</argLine>
>>>            <includes>
>>>                <include>**/IT*.java</include>
>>>              </includes>
>>>            </configuration>
>>>           </execution>
>>>          </executions>
>>>         </plugin>
>>> </plugins>
>>>   </build>
>>> </project>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051.html
>>> Sent from the Sonar user mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>     http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>>
lts.zip (18M) <http://sonar.15.n6.nabble.com/attachment/5003421/0/lts.zip>




--
View this message in context: http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051p5003421.html

Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






If you reply to this email, your message will be added to the discussion below:
http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051p5003563.html
To unsubscribe from IT test coverage is 0% using Jacoco in SONAR, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IT test coverage is 0% using Jacoco in SONAR

g.abcdefg
In reply to this post by Freddy Mallet
Hi Freddy,

Did you get time to look into this issue?
Please, need your help here.

Regards,
Pankaj


On Fri, Sep 28, 2012 at 2:48 PM, pankaj sharma <[hidden email]> wrote:
It's not needed for sample project. We can remove it for now.
I missed removing it while creating sample.

Regards,
Pankaj


On Thu, Sep 27, 2012 at 7:00 PM, Freddy Mallet [via Sonar] <[hidden email]> wrote:
I'm sorry Pankaj but I don't manage to play locally with the provided sample maven project as there is missing dependency on testlink.client:testlink.api.java.client:jar:2.0.

Kind regards,
Freddy
-
Sonar for Continuous Inspection



On Mon, Sep 24, 2012 at 4:13 PM, g.abcdefg <[hidden email]> wrote:
Hi Freddy,

Please find attach a sample Maven project.
Hoping that, issue get reproduce with this.

Regards,
Pankaj


On Fri, Sep 21, 2012 at 3:33 PM, pankaj sharma <[hidden email]> wrote:

> Hi Freddy,
>
> Thanks a lot.
> I will send a sample project by Monday.
>
> Regards,
> Pankaj
>
>
> On Wed, Sep 19, 2012 at 2:04 PM, Freddy Mallet [via Sonar] <
> [hidden email]> wrote:
>
>> Hello,
>>
>> Everything seems to be configured correctly and so should work. Could you
>> provide a simple Maven project to help us reproduce this issue locally ?
>>
>> Thanks
>> Freddy
>> -----
>> twitter.com/FreddyMallet
>> Sonar for Continuous Inspection
>>
>>
>>
>> On Fri, Sep 14, 2012 at 12:22 PM, g.abcdefg <[hidden email]<http://user/SendEmail.jtp?type=node&node=5003235&i=0>

>> > wrote:
>>
>>> I am using:
>>> SONAR v.3.2 (it has jacoco)
>>> Maven 3.0.4
>>>
>>> Followed
>>> "
>>> http://johndobie.blogspot.in/2012/05/easy-unit-and-integration-code-coverage.html#comment-form
>>> "
>>> to get separate code coverage for unit & IT tests. But IT test coverage
>>> is
>>> shown as 0%.
>>> It is generating separate jacoco-unit.exec (44kb) & jacoco-it.exec
>>> (14kb),
>>> but coverage is only shown for unit tests on SONAR.
>>>
>>> Logs shows as:
>>> [INFO] [13:10:23.515] Sensor SquidSensor done: 9437 ms
>>> [INFO] [13:10:23.515] Sensor JaCoCoSensor...
>>> [INFO] [13:10:23.578] Analysing
>>>
>>> D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-unit.exec
>>> [INFO] [13:10:30.390] Sensor JaCoCoSensor done: 6875 ms
>>> [INFO] [13:10:30.390] Sensor JaCoCoItSensor...
>>> [INFO] [13:10:30.390] Analysing
>>>
>>> D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\coverage-reports\jacoco-it.exec
>>> [INFO] [13:10:30.469] Sensor JaCoCoItSensor done: 79 ms
>>> [INFO] [13:10:30.484] Sensor SurefireSensor...
>>> [INFO] [13:10:30.484] parsing
>>>
>>> D:\Perforce\sirfstudio\server\ltsrelease\lts\lts-webapp\target\surefire-reports
>>> [INFO] [13:10:30.828] Sensor SurefireSensor done: 344 ms
>>> [INFO] [13:10:30.828] Sensor CpdSensor...
>>> [INFO] [13:10:30.828] SonarEngine is used
>>> [INFO] [13:10:30.844] Cross-project analysis disabled
>>> [INFO] [13:10:32.312] Sensor CpdSensor done: 1484 ms
>>> [INFO] [13:10:32.312] Sensor CheckstyleSensor...
>>>
>>>
>>> POM file:
>>> <project xmlns="http://maven.apache.org/POM/4.0.0"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>> http://maven.apache.org/maven-v4_0_0.xsd">
>>>   <modelVersion>4.0.0</modelVersion>
>>>   <groupId>com.csr.lts</groupId>
>>>   <artifactId>lts-webapp</artifactId>
>>>   <packaging>war</packaging>
>>>   <name>LTS Webapp</name>
>>>   <url>http://maven.apache.org</url>
>>>    <parent>
>>>     <groupId>com.csr</groupId>
>>>     <artifactId>lts</artifactId>
>>>     <version>0.1-SNAPSHOT</version>
>>>   </parent>
>>>
>>>  <properties>
>>>
>>>
>>> <coverage.reports.dir>${basedir}/target/coverage-reports</coverage.reports.dir>
>>>
>>>
>>> <sonar.jacoco.reportPath>${coverage.reports.dir}/jacoco-unit.exec</sonar.jacoco.reportPath>
>>>
>>>
>>> <sonar.jacoco.itReportPath>${coverage.reports.dir}/jacoco-it.exec</sonar.jacoco.itReportPath>
>>>
>>> <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
>>>
>>>
>>> <sonar.jacoco.jar>${basedir}/lib/org.jacoco.agent-0.5.10.201208310627-runtime.jar</sonar.jacoco.jar>
>>> </properties>
>>>
>>>   <build>
>>>     <finalName>lts</finalName>
>>>
>>> <plugins>
>>>
>>>
>>> <plugin>
>>>         <groupId>org.apache.maven.plugins</groupId>
>>>         <artifactId>maven-surefire-plugin</artifactId>
>>>         <version>2.12.3</version>
>>>         <dependencies>
>>>          <dependency>
>>>           <groupId>org.apache.maven.surefire</groupId>
>>>           <artifactId>surefire-junit47</artifactId>
>>>           <version>2.12</version>
>>>          </dependency>
>>>         </dependencies>
>>>         <configuration>
>>>
>>>
>>> <argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.reportPath},append=false,includes=com.*</argLine>
>>>          <includes>
>>>                  <include>**/*Test.java</include>
>>>                 <include>**/Test*.java</include>
>>>          </includes>
>>>           <excludes>
>>>           <exclude>**/IT*.java</exclude>
>>>           </excludes>
>>>         </configuration>
>>>         </plugin>
>>>
>>> <plugin>
>>>          <groupId>org.apache.maven.plugins</groupId>
>>>          <artifactId>maven-failsafe-plugin</artifactId>
>>>          <version>2.12.3</version>
>>>          <dependencies>
>>>           <dependency>
>>>            <groupId>org.apache.maven.surefire</groupId>
>>>            <artifactId>surefire-junit47</artifactId>
>>>            <version>2.12</version>
>>>           </dependency>
>>>          </dependencies>
>>>
>>>          <executions>
>>>           <execution>
>>>            <goals>
>>>                         <goal>integration-test</goal>
>>>            </goals>
>>>            <configuration>
>>>
>>>
>>> <argLine>-javaagent:${sonar.jacoco.jar}=destfile=${sonar.jacoco.itReportPath},append=false,includes=com.*</argLine>
>>>            <includes>
>>>                <include>**/IT*.java</include>
>>>              </includes>
>>>            </configuration>
>>>           </execution>
>>>          </executions>
>>>         </plugin>
>>> </plugins>
>>>   </build>
>>> </project>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051.html
>>> Sent from the Sonar user mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>     http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>>
lts.zip (18M) <http://sonar.15.n6.nabble.com/attachment/5003421/0/lts.zip>




--
View this message in context: http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051p5003421.html

Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






If you reply to this email, your message will be added to the discussion below:
http://sonar.15.n6.nabble.com/IT-test-coverage-is-0-using-Jacoco-in-SONAR-tp5003051p5003563.html
To unsubscribe from IT test coverage is 0% using Jacoco in SONAR, click here.
NAML


Loading...