Hello,
I have a RESTFul web service project that has a couple of get and put calls. 
This is a Maven project and from now I will refer to it as 'Dev project' from 
now on. 
I have compiled this project with the debug flag and have deployed the webapp 
on Glassfish.



I also have an integration test project that is a  separate maven project and 
makes calls to the Dev project. In the POM of this project I am preparing the 
Java agent and am copying  the .class files of the Dev project to a certain 
location under the target folder of the test project. The tests in this project 
make web service end points implemented in the Dev project and my goal is to 
get coverage when I run 'mvn verify'.


The issue here is when a report is generated there is no line level coverage 
even though the class level coverage seems accurate. Could you please point out 
what am I missing because of which the report is missing line level coverage. 



TEST POM:
 <build>
        <finalName>JaxRsAppTest</finalName>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.9</version>
                <executions>
                    <execution>
                        <id>pre-integration-test</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            
<destFile>${project.build.directory}/coverage-reports-test/jacoco-test-it.exec</destFile>
                            <propertyName>failsafeArgLine</propertyName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>post-integration-test</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            
<dataFile>${project.build.directory}/coverage-reports-test/jacoco-test-it.exec</dataFile>
                            
<outputDirectory>${project.reporting.outputDirectory}/jacoco-test-it</outputDirectory>
                        </configuration>
                    </execution>
                </executions>

            </plugin> <!-- copies the Dev project's class files to the target 
of the test project>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.2</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            
<outputDirectory>S:/JaxRsApp/Test/test-JaxRS/target/classes</outputDirectory>
                            <resources>
                                <resource>
                                    
<directory>S:/JaxRsApp/Dev/dmahapat_JaxRsApp/target/classes</directory>
                                    <filtering>false</filtering>

                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.20.1</version>
                <configuration>
                    <argLine>${failsafeArgLine}</argLine>
                    <includes>
                        <include>**/*IntegrationTest.java</include>
                    </includes>

                </configuration>
                <executions>
                    <execution>
                        <id>integration-tests</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>





Thanks in advance.


-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/ee144ebc-2100-493e-9087-6a76d6d13bb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to