arquillian / arquillian-extension-jacoco

Arquillian Jacoco Extension
28 stars 30 forks source link

Managed container doesn't generate JaCoCo's coverage report #21

Open dudaMeneses opened 9 years ago

dudaMeneses commented 9 years ago

Arquillian runs nicely but integration tests aren't covered by report when managed container is used. Follow below my configurations:

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<dependencies>
    <dependency>
        <groupId>org.jboss.arquillian.extension</groupId>
        <artifactId>arquillian-jacoco</artifactId>
        <version>1.0.0.Alpha8</version>
    </dependency>
    <dependency>
        <groupId>org.jacoco</groupId>
        <artifactId>org.jacoco.core</artifactId>
        <version>${jacoco.version}</version>
    </dependency>
</dependencies>
<configuration>
    <append>true</append>
</configuration>
<executions>
    <execution>
        <id>pre-unit-tests</id>
        <phase>process-test-classes</phase>
        <goals>
            <goal>instrument</goal>
        </goals>
        <configuration>
            <destFile>${sonar.jacoco.reportPath}</destFile>
            <propertyName>jacoco.agent.ut.arg</propertyName>
            <append>true</append>
        </configuration>
    </execution>
    <execution>
        <id>post-unit-tests</id>
        <goals>
            <goal>restore-instrumented-classes</goal>
        </goals>
    </execution>
    <execution>
        <id>pre-integration-test</id>
        <phase>package</phase>
        <goals>
            <goal>prepare-agent</goal>
        </goals>
        <configuration>
            <destFile>${sonar.jacoco.itReportPath}</destFile>
            <propertyName>jacoco.agent.it.arg</propertyName>
            <append>true</append>
        </configuration>
    </execution>
    <execution>
        <id>jacoco-merge</id>
        <phase>verify</phase>
        <goals>
            <goal>merge</goal>
        </goals>
        <configuration>
            <fileSets>
                <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
                    <directory>target/jacoco</directory>
                    <includes>
                        <include>*.exec</include>
                    </includes>
                </fileSet>
            </fileSets>
            <destFile>target/jacoco.exec</destFile>
        </configuration>
    </execution>
    <execution>
        <id>jacoco-site</id>
        <phase>verify</phase>
        <goals>
            <goal>report</goal>
        </goals>
    </execution>
   </executions>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12.4</version>
<configuration>
    <environmentVariables>
        <JBOSS_HOME>arquillian.jbossHome</JBOSS_HOME>
    </environmentVariables>
    <argLine>${jacoco.agent.it.arg}</argLine>
    <includes>
        <include>integration/*</include>
    </includes>
    <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
    <systemPropertyVariables>
        <arquillian.launch>jboss-managed</arquillian.launch>
    </systemPropertyVariables>
</configuration>
<executions>
    <execution>
        <id>integration-tests</id>
        <phase>integration-test</phase>
        <goals>
            <goal>integration-test</goal>
            <goal>verify</goal>
        </goals>
    </execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
    <skipTests>true</skipTests>
    <systemPropertyVariables>
        <jacoco-agent.destfile>target/jacoco/jacoco-ut.exec</jacoco-agent.destfile>
    </systemPropertyVariables>
</configuration>
<executions>
    <execution>
        <id>unit-tests</id>
        <phase>test</phase>
        <goals>
            <goal>test</goal>
        </goals>
        <configuration>
            <skipTests>false</skipTests>
            <argLine>${jacoco.agent.ut.arg}</argLine>
            <excludes>
                <exclude>integration/*IT.java</exclude>
            </excludes>
        </configuration>
    </execution>
</executions>
</plugin>
aslakknutsen commented 9 years ago

Could you provide a complete example with some java code?

How do you run this?

CSchulz commented 9 years ago

I have the same issue and found a cause. If you set the argline property of the failsafe-plugin it doesn't work anymore otherwise the coverage is fully available.

@aslakknutsen If you want I can upload my showcase project.

sventorben commented 9 years ago

My team is also facing a similar issue. @CSchulz If you can upload your showcase, I am happy to support further investigations.

CSchulz commented 9 years ago

@sventorben Finally I have found a solution to get it working. See my linked repository.

https://github.com/CSchulz/arquillian-jacoco-showcase

It seems that it isn't supported to change the datafile for integration tests (yet). Mistake from my side, using wrong property name.

CSchulz commented 9 years ago

@aslakknutsen @sventorben I think it works like expected, if you don't overwrite the argline of the failsafe-plugin.

If you want to pass anything to the container (vm) you have to use the arquillian.xml and create there a property javaVmArguments.

dudaMeneses commented 9 years ago

@CSchulz I've done what you said but it doesn't filled any coverage anyway :(

@aslakknutsen follow below an quick example I created

https://github.com/dudaMeneses/arquillian-jacoco-example

rankinc commented 9 years ago

I'm also seeing something like this with a managed Tomcat 7 container. Can someone tell me how Arquillian and JaCoCo are supposed to integrate please? It looks like Arquillian is instrumenting everything offline before packaging everything up into my WebArchive (perhaps courtesy of the

<extension qualifier="jacoco">
    <property name="includes">com.my.stuff.*</property>
</extension>

section in my arquillian.xml?). I'm certainly not seeing the JaCoCo Java agent included on my managed Tomcat's command line, and if I try to add it in manually via ${argLine} then I get lots of "Class already instrumented" errors.

I'm also noticing that my jacoco.exec file is 68K after the unit tests run and 224K after the integration tests, but the coverage report generated in the verify phase always looks exactly the same, regardless of whether I include the integration tests or not.

Frankly, I have no idea what is going on here.

rankinc commented 9 years ago

Hmm, it looks like the jacoco.exec file from my integration tests only contains the tiny amount of extra coverage gained from executing the *IT classes themselves. I don't believe that the coverage data from the managed Tomcat container is being dumped at all, because when I configured the JaCoCo agent to dump to a totally separate file, that file was 0K long.

rankinc commented 9 years ago

OK, so I managed to get my coverage data after all. The steps were:

<property name="javaVmArguments">${argLine},jmx=true,includes=com.my.stuff.*</property>
<extension qualifier="jacoco">
    <property name="excludes">*</property>
</extension>
JMXServiceURL jmxURL = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:8089/jmxrmi");
try (JMXConnector jmxc = JMXConnectorFactory.connect(jmxURL)) {
    MBeanServerConnection connection = jmxc.getMBeanServerConnection();
    ObjectName objName = new ObjectName("org.jacoco:type=Runtime");
    connection.invoke(objName, "dump",
        new Object[]{ true },
        new String[]{ Boolean.TYPE.getName() }
    );
}

My Coverage Report in Jenkins still mentions classes that I believe I've excluded - although they all show 0% coverage now - but this must be close to the correct solution.

mejdahl commented 8 years ago

I have the same problem, I got a jacoco.exec but no jacoco-it.exec" My setup is more or less the same as your arquillian-jacoco-example.

The difference to our project is:

Could it be the use of embedded wildfly container or is it because I use core 1.1.11 or.... Any suggestion?

Please note that I made the arquillian-jacoco-example work nicely for Wildfly 8.2.1 managed!

rankinc commented 8 years ago

Speaking as a user who has also beaten my head against the table to get this working...

I have the same problem, I got a jacoco.exec but no jacoco-it.exec

What matters is the coverage data that has been dumped into your jacoco.exe. For example, my build contains this:

<properties>
    <argLine></argLine>
</properties>

...

<plugin>
    <groupId>org.jacoco</groupId>
    <artifactId>jacoco-maven-plugin</artifactId>
    <version>${jacoco.version}</version>
    <executions>
        <execution>
            <goals>
                <goal>prepare-agent</goal>
            </goals>
        </execution>
        <execution>
            <id>report</id>
            <phase>verify</phase>
            <goals>
                <goal>report</goal>
            </goals>
        </execution>
    </executions>
</plugin>

My integrations tests also pass ${argLine} as part of the container's javaVmArgument property in arquillian.xml. This results in both my unit tests and my integration tests writing into jacoco.exec, because the JaCoCo agent uses append=true by default. Finally, I create the report in the verify phase, which comes after the integration-test phase in the Maven build lifecycle; you might want to check that you're not creating your report in the package phase instead.

mejdahl commented 8 years ago

Well I created my Jacoco look like this:

<plugin> 
    <groupId>org.jacoco</groupId>
    <artifactId>jacoco-maven-plugin</artifactId>
    <version>${version.jacoco}</version>
    <executions>
        <execution>
            <id>Jacoco-prepare-agent</id>
            <goals>
                <goal>prepare-agent</goal>
            </goals>
        </execution>
        <execution>
            <id>Jacoco-prepare-agent-integration</id>
            <goals>
                <goal>prepare-agent-integration</goal>
            </goals>
            <configuration>
                <destFile>${project.build.directory}/jacoco-it.exec</destFile>
            </configuration>
        </execution>
    </executions>               
</plugin>

I expected to find a jacoco.exec and a jacoco-it.exec in the target/ folder but only found the jacoco.exec! The maven output look as expected, both excecutions is shown at the right lifecycle and with the right filenames!

Note that the "javaVmArguments" only works when using managed container..

I have tried your suggestion, but when looking in the generated "site" it is clear that no "IT" classes is covered.

rankinc commented 8 years ago

So where do you execute the report goal for jacoco-maven-plugin?

mejdahl commented 8 years ago

I tried a lot of combination but I stopped lokking for the right spot for the report generation when I found that the file wasn't genereated!

<execution>
    <id>jacoco-site</id>
    <phase>verify</phase>
    <goals>
        <goal>report</goal>
        <goal>report-integration</goal>
    </goals>
</execution>

Here is a snip form the maven output

[INFO] argLine set to -javaagent:C:\\Users\\sihs\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.7.6.201602180812\\org.jacoco.agent-0.7.6.201602180812-runtime.jar=destfile=C:\\src\\domain\\geodata\\geodata\\target\\jacoco-it.exec but it failed with [INFO] Skipping JaCoCo execution due to missing execution data file:C:\src\domain\geodata\geodata\target\jacoco-it.exec

rankinc commented 8 years ago

I think this implies that JaCoCo isn't instrumenting your "IT" classes, which would suggest that your maven-failsafe-plugin isn't configured correctly with your integration test argLine. Perhaps this document is relevant?

mejdahl commented 8 years ago

Tanks, I'll try to add the properties name and see what happens. I'm not sure that I have an answer to Day.

mejdahl commented 8 years ago

Thanks again! Now I got the -it file (0 size) but now the Wildfly is stalling it might be something with the managementPort or .....

rankinc commented 8 years ago

Sorry, but this is JIRA not StackOverflow, and the title of this particular issue is

Managed container doesn't generate JaCoCo's coverage report

You don't have a bug at all - all you have is a configuration issue with an embedded container and I have polluted this issue quite enough already.

OlivierMary commented 8 years ago

Hi,

I hope that can help you :

pom.xml with :

<properties>
...
        <version.arquillian.wildfly.managed>8.2.1.Final</version.arquillian.wildfly.managed>
        <version.surefire.plugin>2.19.1</version.surefire.plugin>
        <version.wildfly>10.1.0.Final</version.wildfly>
        <version.dependency.plugin>2.10</version.dependency.plugin>
        <version.jacoco>0.7.4.201502262128</version.jacoco>
        <version.arquillian_jacoco>1.0.0.Alpha8</version.arquillian_jacoco>
...
</properties>

...

<profile>
            <id>arquillian-wildfly-managed-jacoco</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>${version.dependency.plugin}</version>
                        <executions>
                            <execution>
                                <id>unpack</id>
                                <phase>process-test-classes</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>org.wildfly</groupId>
                                            <artifactId>wildfly-dist</artifactId>
                                            <version>${version.wildfly}</version>
                                            <type>zip</type>
                                            <overWrite>false</overWrite>
                                            <outputDirectory>${project.build.directory}</outputDirectory>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${version.surefire.plugin}</version>
                        <configuration>
                            <skipTests>false</skipTests>
                            <systemPropertyVariables>
                                <arquillian.launch>arquillian-wildfly-managed</arquillian.launch>
                                <jacoco.agent>${jacoco.agent}</jacoco.agent>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${version.jacoco}</version>
                        <executions>
                            <execution>
                                <id>jacoco-prepare</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>jacoco-prepare-it</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>prepare-agent-integration</goal>
                                </goals>
                                <configuration>
                                    <propertyName>jacoco.agent</propertyName>
                                </configuration>
                            </execution>
                            <execution>
                                <id>jacoco-report</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>jacoco-report-it</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>report-integration</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly</groupId>
                    <artifactId>wildfly-arquillian-container-managed</artifactId>
                    <version>${version.arquillian.wildfly.managed}</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.jacoco</groupId>
                    <artifactId>org.jacoco.core</artifactId>
                    <version>${version.jacoco}</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.arquillian.extension</groupId>
                    <artifactId>arquillian-jacoco</artifactId>
                    <version>${version.arquillian_jacoco}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>

and arquillian.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

    <container qualifier="arquillian-wildfly-remote"/>
    <container qualifier="arquillian-wildfly-managed">
        <configuration>
            <property name="jbossHome">target/wildfly-10.1.0.Final</property>
            <property name="javaVmArguments">-Xmx1024m -Xnoagent -Djava.compiler=NONE -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 ${jacoco.agent}</property>
            <property name="allowConnectingToRunningServer">true</property>
        </configuration>
    </container>

</arquillian>

NOTE : With this you can see IT coverage only on Sonar :

mvn test -Parquillian-wildfly-managed-jacoco -e
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1:sonar -e

NOTE2 : Do not set another properties ${jacoco.agent} in pom.xml that will erase the properties of jacoco plugin.

NOTE3 : NOTE2 => Make another profile for test in eclipse / idea or you will get this error :

/usr/lib/jvm/java-8-openjdk-amd64/bin/java -ea -Darquillian.launch=arquillian-wildfly-managed -javaagent:/opt/idea-IU-162.2228.15/lib/coverage-agent.jar=/tmp/coverage107args -Didea.launcher.port=7533 -Didea.launcher.bin.path=/opt/idea-IU-162.2228.15/bin -Didea.junit.sm_runner -Dfile.encoding=UTF-8 -classpath /opt/idea-IU-162.2228.15/lib/idea_rt.jar:/opt/idea-IU-162.2228.15/plugins/junit/lib/junit-rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/home/olivier/reposGit/ShapeMyEvent/shapemyevent-microprofile/shapemyevent-talk/target/test-classes:/home/olivier/reposGit/ShapeMyEvent/shapemyevent-microprofile/shapemyevent-talk/target/classes:/home/olivier/reposGit/ShapeMyEvent/shapemyevent-microprofile/shapemyevent-commons/target/classes:/home/olivier/.m2/repository/javax/javaee-api/7.0/javaee-api-7.0.jar:/home/olivier/.m2/repository/com/sun/mail/javax.mail/1.5.0/javax.mail-1.5.0.jar:/home/olivier/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/home/olivier/.m2/repository/io/swagger/swagger-annotations/1.5.10/swagger-annotations-1.5.10.jar:/home/olivier/.m2/repository/junit/junit/4.12/junit-4.12.jar:/home/olivier/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/olivier/reposGit/ShapeMyEvent/shapemyevent-microprofile/shapemyevent-commons/target/test-classes:/home/olivier/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-spi/1.2.6/shrinkwrap-spi-1.2.6.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-spi/2.2.4/shrinkwrap-resolver-spi-2.2.4.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-spi-maven/2.2.4/shrinkwrap-resolver-spi-maven-2.2.4.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-api-maven-archive/2.2.4/shrinkwrap-resolver-api-maven-archive-2.2.4.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-impl-maven/2.2.4/shrinkwrap-resolver-impl-maven-2.2.4.jar:/home/olivier/.m2/repository/org/eclipse/aether/aether-api/1.0.0.v20140518/aether-api-1.0.0.v20140518.jar:/home/olivier/.m2/repository/org/eclipse/aether/aether-impl/1.0.0.v20140518/aether-impl-1.0.0.v20140518.jar:/home/olivier/.m2/repository/org/eclipse/aether/aether-spi/1.0.0.v20140518/aether-spi-1.0.0.v20140518.jar:/home/olivier/.m2/repository/org/eclipse/aether/aether-util/1.0.0.v20140518/aether-util-1.0.0.v20140518.jar:/home/olivier/.m2/repository/org/eclipse/aether/aether-connector-basic/1.0.0.v20140518/aether-connector-basic-1.0.0.v20140518.jar:/home/olivier/.m2/repository/org/eclipse/aether/aether-transport-wagon/1.0.0.v20140518/aether-transport-wagon-1.0.0.v20140518.jar:/home/olivier/.m2/repository/org/apache/maven/maven-aether-provider/3.2.5/maven-aether-provider-3.2.5.jar:/home/olivier/.m2/repository/org/apache/maven/maven-model/3.2.5/maven-model-3.2.5.jar:/home/olivier/.m2/repository/org/apache/maven/maven-model-builder/3.2.5/maven-model-builder-3.2.5.jar:/home/olivier/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar:/home/olivier/.m2/repository/org/apache/maven/maven-repository-metadata/3.2.5/maven-repository-metadata-3.2.5.jar:/home/olivier/.m2/repository/org/apache/maven/maven-settings/3.2.5/maven-settings-3.2.5.jar:/home/olivier/.m2/repository/org/apache/maven/maven-settings-builder/3.2.5/maven-settings-builder-3.2.5.jar:/home/olivier/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar:/home/olivier/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.21/plexus-interpolation-1.21.jar:/home/olivier/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.20/plexus-utils-3.0.20.jar:/home/olivier/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar:/home/olivier/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar:/home/olivier/.m2/repository/org/apache/maven/wagon/wagon-provider-api/2.6/wagon-provider-api-2.6.jar:/home/olivier/.m2/repository/org/apache/maven/wagon/wagon-file/2.6/wagon-file-2.6.jar:/home/olivier/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/home/olivier/.m2/repository/org/apache/maven/wagon/wagon-http-lightweight/2.6/wagon-http-lightweight-2.6.jar:/home/olivier/.m2/repository/org/apache/maven/wagon/wagon-http-shared/2.6/wagon-http-shared-2.6.jar:/home/olivier/.m2/repository/org/jsoup/jsoup/1.7.2/jsoup-1.7.2.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-impl-maven-archive/2.2.4/shrinkwrap-resolver-impl-maven-archive-2.2.4.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-spi-maven-archive/2.2.4/shrinkwrap-resolver-spi-maven-archive-2.2.4.jar:/home/olivier/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.plexus/0.3.0.M1/org.eclipse.sisu.plexus-0.3.0.M1.jar:/home/olivier/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar:/home/olivier/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar:/home/olivier/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.0.M1/org.eclipse.sisu.inject-0.3.0.M1.jar:/home/olivier/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.3/plexus-compiler-javac-2.3.jar:/home/olivier/.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.3/plexus-compiler-api-2.3.jar:/home/olivier/.m2/repository/org/jboss/arquillian/junit/arquillian-junit-container/1.1.11.Final/arquillian-junit-container-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/test/arquillian-test-api/1.1.11.Final/arquillian-test-api-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/container/arquillian-container-test-api/1.1.11.Final/arquillian-container-test-api-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/container/arquillian-container-test-spi/1.1.11.Final/arquillian-container-test-spi-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/container/arquillian-container-spi/1.1.11.Final/arquillian-container-spi-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/core/arquillian-core-impl-base/1.1.11.Final/arquillian-core-impl-base-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/test/arquillian-test-impl-base/1.1.11.Final/arquillian-test-impl-base-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/container/arquillian-container-impl-base/1.1.11.Final/arquillian-container-impl-base-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/config/arquillian-config-api/1.1.11.Final/arquillian-config-api-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/config/arquillian-config-impl-base/1.1.11.Final/arquillian-config-impl-base-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-spi/2.0.0-alpha-9/shrinkwrap-descriptors-spi-2.0.0-alpha-9.jar:/home/olivier/.m2/repository/org/jboss/arquillian/container/arquillian-container-test-impl-base/1.1.11.Final/arquillian-container-test-impl-base-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-impl-base/1.2.6/shrinkwrap-impl-base-1.2.6.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-api/1.2.6/shrinkwrap-api-1.2.6.jar:/home/olivier/.m2/repository/org/jboss/arquillian/junit/arquillian-junit-core/1.1.11.Final/arquillian-junit-core-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/test/arquillian-test-spi/1.1.11.Final/arquillian-test-spi-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/core/arquillian-core-spi/1.1.11.Final/arquillian-core-spi-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-api-maven/2.2.4/shrinkwrap-resolver-api-maven-2.2.4.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-api/2.2.4/shrinkwrap-resolver-api-2.2.4.jar:/home/olivier/.m2/repository/org/jboss/resteasy/resteasy-client/3.0.19.Final/resteasy-client-3.0.19.Final.jar:/home/olivier/.m2/repository/org/jboss/resteasy/resteasy-jaxrs/3.0.19.Final/resteasy-jaxrs-3.0.19.Final.jar:/home/olivier/.m2/repository/org/jboss/spec/javax/ws/rs/jboss-jaxrs-api_2.0_spec/1.0.0.Final/jboss-jaxrs-api_2.0_spec-1.0.0.Final.jar:/home/olivier/.m2/repository/org/jboss/spec/javax/annotation/jboss-annotations-api_1.2_spec/1.0.0.Final/jboss-annotations-api_1.2_spec-1.0.0.Final.jar:/home/olivier/.m2/repository/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.jar:/home/olivier/.m2/repository/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.jar:/home/olivier/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/olivier/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar:/home/olivier/.m2/repository/commons-io/commons-io/2.1/commons-io-2.1.jar:/home/olivier/.m2/repository/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar:/home/olivier/.m2/repository/org/jboss/logging/jboss-logging/3.1.4.GA/jboss-logging-3.1.4.GA.jar:/home/olivier/.m2/repository/org/jboss/resteasy/resteasy-jackson-provider/3.0.19.Final/resteasy-jackson-provider-3.0.19.Final.jar:/home/olivier/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.12/jackson-core-asl-1.9.12.jar:/home/olivier/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.12/jackson-mapper-asl-1.9.12.jar:/home/olivier/.m2/repository/org/codehaus/jackson/jackson-jaxrs/1.9.12/jackson-jaxrs-1.9.12.jar:/home/olivier/.m2/repository/org/codehaus/jackson/jackson-xc/1.9.12/jackson-xc-1.9.12.jar:/home/olivier/.m2/repository/org/glassfish/javax.json/1.0.4/javax.json-1.0.4.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-arquillian-container-managed/8.2.1.Final/wildfly-arquillian-container-managed-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-arquillian-common/8.2.1.Final/wildfly-arquillian-common-8.2.1.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/testenricher/arquillian-testenricher-cdi/1.1.11.Final/arquillian-testenricher-cdi-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/testenricher/arquillian-testenricher-ejb/1.1.11.Final/arquillian-testenricher-ejb-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/testenricher/arquillian-testenricher-initialcontext/1.1.11.Final/arquillian-testenricher-initialcontext-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/testenricher/arquillian-testenricher-osgi/2.1.0.CR2/arquillian-testenricher-osgi-2.1.0.CR2.jar:/home/olivier/.m2/repository/org/jboss/arquillian/testenricher/arquillian-testenricher-resource/1.1.11.Final/arquillian-testenricher-resource-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/protocol/arquillian-protocol-servlet/1.1.11.Final/arquillian-protocol-servlet-1.1.11.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-arquillian-testenricher-msc/8.2.1.Final/wildfly-arquillian-testenricher-msc-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-server/8.2.1.Final/wildfly-server-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-controller/8.2.1.Final/wildfly-controller-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-core-security/8.2.1.Final/wildfly-core-security-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-core-security-api/8.2.1.Final/wildfly-core-security-api-8.2.1.Final.jar:/home/olivier/.m2/repository/org/jboss/staxmapper/1.1.0.Final/staxmapper-1.1.0.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-domain-http-interface/8.2.1.Final/wildfly-domain-http-interface-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-domain-management/8.2.1.Final/wildfly-domain-management-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-deployment-repository/8.2.1.Final/wildfly-deployment-repository-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-patching/8.2.1.Final/wildfly-patching-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-cli/8.2.1.Final/wildfly-cli-8.2.1.Final.jar:/home/olivier/.m2/repository/org/jboss/aesh/aesh/0.33.11/aesh-0.33.11.jar:/home/olivier/.m2/repository/org/fusesource/jansi/jansi/1.9/jansi-1.9.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/../lib/jconsole.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-platform-mbean/8.2.1.Final/wildfly-platform-mbean-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-process-controller/8.2.1.Final/wildfly-process-controller-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-remoting/8.2.1.Final/wildfly-remoting-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-io/8.2.1.Final/wildfly-io-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-network/8.2.1.Final/wildfly-network-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-version/8.2.1.Final/wildfly-version-8.2.1.Final.jar:/home/olivier/.m2/repository/org/jboss/jandex/1.2.1.Final/jandex-1.2.1.Final.jar:/home/olivier/.m2/repository/org/jboss/invocation/jboss-invocation/1.2.1.Final/jboss-invocation-1.2.1.Final.jar:/home/olivier/.m2/repository/org/jboss/logmanager/jboss-logmanager/1.5.2.Final/jboss-logmanager-1.5.2.Final.jar:/home/olivier/.m2/repository/org/jboss/modules/jboss-modules/1.3.3.Final/jboss-modules-1.3.3.Final.jar:/home/olivier/.m2/repository/org/jboss/stdio/jboss-stdio/1.0.2.GA/jboss-stdio-1.0.2.GA.jar:/home/olivier/.m2/repository/org/jboss/jboss-vfs/3.2.5.Final/jboss-vfs-3.2.5.Final.jar:/home/olivier/.m2/repository/io/undertow/undertow-core/1.1.8.Final/undertow-core-1.1.8.Final.jar:/home/olivier/.m2/repository/org/jboss/msc/jboss-msc/1.2.2.Final/jboss-msc-1.2.2.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-controller-client/8.2.1.Final/wildfly-controller-client-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-protocol/8.2.1.Final/wildfly-protocol-8.2.1.Final.jar:/home/olivier/.m2/repository/org/jboss/jboss-dmr/1.2.0.Final/jboss-dmr-1.2.0.Final.jar:/home/olivier/.m2/repository/org/jboss/threads/jboss-threads/2.1.1.Final/jboss-threads-2.1.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-jmx/8.2.1.Final/wildfly-jmx-8.2.1.Final.jar:/home/olivier/.m2/repository/org/jboss/jboss-common-core/2.2.22.GA/jboss-common-core-2.2.22.GA.jar:/home/olivier/.m2/repository/org/osgi/org.osgi.core/5.0.0/org.osgi.core-5.0.0.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-arquillian-protocol-jmx/8.2.1.Final/wildfly-arquillian-protocol-jmx-8.2.1.Final.jar:/home/olivier/.m2/repository/org/wildfly/security/wildfly-security-manager/1.0.0.Final/wildfly-security-manager-1.0.0.Final.jar:/home/olivier/.m2/repository/org/jboss/arquillian/protocol/arquillian-protocol-jmx/1.1.11.Final/arquillian-protocol-jmx-1.1.11.Final.jar:/home/olivier/.m2/repository/org/jboss/osgi/metadata/jbosgi-metadata/3.0.1.Final/jbosgi-metadata-3.0.1.Final.jar:/home/olivier/.m2/repository/org/jboss/xnio/xnio-api/3.3.0.Final/xnio-api-3.3.0.Final.jar:/home/olivier/.m2/repository/org/jboss/xnio/xnio-nio/3.3.0.Final/xnio-nio-3.3.0.Final.jar:/home/olivier/.m2/repository/org/jboss/marshalling/jboss-marshalling/1.4.9.Final/jboss-marshalling-1.4.9.Final.jar:/home/olivier/.m2/repository/org/jboss/marshalling/jboss-marshalling-river/1.4.9.Final/jboss-marshalling-river-1.4.9.Final.jar:/home/olivier/.m2/repository/org/jboss/remoting/jboss-remoting/4.0.7.Final/jboss-remoting-4.0.7.Final.jar:/home/olivier/.m2/repository/org/jboss/remotingjmx/remoting-jmx/2.0.0.Final/remoting-jmx-2.0.0.Final.jar:/home/olivier/.m2/repository/org/jboss/sasl/jboss-sasl/1.0.4.Final/jboss-sasl-1.0.4.Final.jar:/home/olivier/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar:/home/olivier/.m2/repository/org/jboss/arquillian/core/arquillian-core-api/1.1.11.Final/arquillian-core-api-1.1.11.Final.jar:/home/olivier/.m2/repository/org/wildfly/wildfly-build-config/8.2.1.Final/wildfly-build-config-8.2.1.Final.jar:/home/olivier/.m2/repository/org/jacoco/org.jacoco.core/0.7.4.201502262128/org.jacoco.core-0.7.4.201502262128.jar:/home/olivier/.m2/repository/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.jar:/home/olivier/.m2/repository/org/jboss/arquillian/extension/arquillian-jacoco/1.0.0.Alpha8/arquillian-jacoco-1.0.0.Alpha8.jar:/home/olivier/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-base/2.0.0-alpha-9/shrinkwrap-descriptors-api-base-2.0.0-alpha-9.jar com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 @w@/tmp/idea_working_dirs_junit.tmp @/tmp/idea_junit.tmp -socket40630
---- IntelliJ IDEA coverage runner ---- 
sampling ...
include patterns:
exclude patterns:nov. 11, 2016 1:36:07 PM org.jboss.as.arquillian.container.managed.ManagedDeployableContainer startInternal
INFOS: Starting container with: [/usr/lib/jvm/java-8-openjdk-amd64/bin/java, -Xmx1024m, -Xnoagent, -Djava.compiler=NONE, -Xdebug, -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005, ${jacoco.agent}, -ea, -Djboss.home.dir=target/wildfly-10.1.0.Final, -Dorg.jboss.boot.log.file=/home/olivier/reposGit/ShapeMyEvent/shapemyevent-microprofile/shapemyevent-talk/target/wildfly-10.1.0.Final/standalone/log/server.log, -Dlogging.configuration=file:/home/olivier/reposGit/ShapeMyEvent/shapemyevent-microprofile/shapemyevent-talk/target/wildfly-10.1.0.Final/standalone/configuration/logging.properties, -Djboss.bundles.dir=target/wildfly-10.1.0.Final/bundles, -jar, /home/olivier/reposGit/ShapeMyEvent/shapemyevent-microprofile/shapemyevent-talk/target/wildfly-10.1.0.Final/jboss-modules.jar, -mp, target/wildfly-10.1.0.Final/modules, org.jboss.as.standalone, -server-config, standalone.xml]
Listening for transport dt_socket at address: 5005
nov. 11, 2016 1:36:08 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.3.0.Final
Erreur : impossible de trouver ou charger la classe principale ${jacoco.agent}
nov. 11, 2016 1:36:08 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.3.0.Final
nov. 11, 2016 1:36:08 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 4.0.7.Final

org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start container

Resultat in sonar :

Integration Tests Coverage 52.2%
line coverage 55.3%
condition coverage 39.3%
Overall Coverage 56.1%
line coverage 60.5%
condition coverage 37.4%

Unit Tests Coverage 10.6%
line coverage 13.0%
condition coverage 0.0%
Unit test success 100.0%
failures 0
errors 0
tests 60
Execution Time 11.6 sec
bartoszmajsak commented 7 years ago

Thanks guys for all the collaboration. We will make a howto on arquillian.org about the JaCoCo configuration soon

CSchulz commented 7 years ago

@bartoszmajsak Any news about the howto? Perhaps a not finished one?

bartoszmajsak commented 7 years ago

Will get it here by the end of the week

raulsperoni commented 6 years ago

Sorry i can't find that howto. Any news?

Thanks.

santoshreddy17 commented 6 years ago

Any update on how to ? A simple example with working report to get unit test & IT coverage would be great.

erVaibhs commented 5 years ago

is there any HowTo created?

hamedkvs commented 2 years ago

any updates on the howto?