Hi,

I want to check code coverage on external weblogic.

I have a Windows Computer with Eclipse and Maven and a oracle linux with 
weblogic in oracle virtual pc.

I already installed the JaCoCo Agent on the linux box and it is running 
inside weblogic.

When I get the measured data form the weblogic in the vbox with the 
jacoco:dump goal, the corresponding .exec file fills with data.
But: there is no code coverage for the integration tests.

If I run the tests in Eclipse and import data from tcpserver with Import 
Code Coverage, there is code coverage shown.

I don't understand, what runs wrong in maven-plugin, because as I see no 
difference in information between Eclipse and maven.

Any suggestions?

Code hier eingeben...                   <plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.2.201409121644</version>
<executions>
<!-- Prepares the property pointing to the JaCoCo runtime agent which is 
passed as VM argument when Maven the Surefire plugin is executed.         
-->
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
<!-- <goal>instrument</goal> -->
</goals>
<configuration>
<propertyName>surefireArgLine</propertyName>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
<include>**</include>
</configuration>
</execution>
<!-- Ensures that the code coverage report for unit tests is created after 
unit tests have been run.         -->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>
</execution>
<execution>
<id>pre-integration-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
<output>file</output>
<!-- Sets the name of the property containing the settings for JaCoCo 
runtime agent.                 -->
<propertyName>failsafeArgLine</propertyName>
</configuration>
</execution>
<!-- Ensures that the code coverage report for integration tests after 
integration tests have been run.         -->
<execution>
<id>post-integration-test</id>
<phase>post-integration-test</phase>
<goals>
<goal>dump</goal>
    <goal>report-integration</goal>
</goals>
<configuration>
<address>vbox</address>
<exclude>com.*</exclude>
<destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
</configuration>
</execution>
</executions>
</plugin> 


and failsafe plugin:
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/integration/**</include>
<include>**/ws/**</include>
<include>**/gui/**</include>
</includes>
<!-- Sets the VM argument line used when integration tests are run. -->
<!-- Sets the VM argument line used when integration tests are run. -->
<argLine>${failsafeArgLine}</argLine>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>


Any hints are welcome how to solve this issue in maven. I'd like to show 
the jacoco results in sonarqube once the problem with the maven plugin is 
solved.

bye

frank

-- 
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/8d264d17-9bee-4eea-87cc-ecbfba39ae47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to