0 Replies Latest reply on Mar 9, 2015 12:09 PM by Chabir Atrahouch

    Arquillian Jacoco Jboss EAP 6.3

    Chabir Atrahouch Newbie

      Hello

       

      I have an application to JBoss EAP 6.3 for proper operation and integration tests have

       

      The problem the Jacoco Library for coverage gives me 0 %, I need a sample configuration.

       

      • Jboss Managed 7.2.0.Final
      • Jacoco 0.7.2.201409121644
      • Jboss Arquillian 1.1.7.Final

       

      Pom.xml

       

      <profile>

                  <id>Test</id>

                  <properties>

                      <skip.unit.tests>true</skip.unit.tests>

                      <skip.integration.tests>false</skip.integration.tests>

                  </properties>

                  <build>

                      <plugins>

                          <plugin>

                              <groupId>org.jacoco</groupId>

                              <artifactId>jacoco-maven-plugin</artifactId>

                              <version>${jacoco.version}</version>

                              <executions>

                                  <execution>

                                      <id>pre-integration-test</id>

                                      <goals>

                                          <goal>prepare-agent-integration</goal>

                                      </goals>

                                      <configuration>

                                          <propertyName>failsafeArgLine</propertyName>

                                          <destFile>${project.build.directory}/jacoco-it.exec</destFile>

                                          <append>true</append>

                                      </configuration>

                                  </execution>

                                  <execution>

                                      <id>generate-integration-test-report</id>

                                      <goals>

                                          <goal>report-integration</goal>

                                      </goals>

                                  </execution>

                              </executions>

                          </plugin>

                          <plugin>

                              <groupId>org.apache.maven.plugins</groupId>

                              <artifactId>maven-surefire-plugin</artifactId>

                              <version>2.18.1</version>

                              <configuration>

                                  <skipTests>${skip.unit.tests}</skipTests>

                                  <excludes>

                                      <exclude>**/*IT.java</exclude>

                                  </excludes>

                              </configuration>

                          </plugin>

                          <plugin>

                              <groupId>org.apache.maven.plugins</groupId>

                              <artifactId>maven-failsafe-plugin</artifactId>

                              <version>2.18.1</version>

                              <configuration>

                                  <argLine>${failsafeArgLine}</argLine>

                                  <systemProperties>

                                      <jacoco.arg>${failsafeArgLine}</jacoco.arg>

                                  </systemProperties>

                                  <encoding>${project.build.sourceEncoding}</encoding>

                                  <skipITs>${skip.integration.tests}</skipITs>

                                  <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>

                              </configuration>

                              <executions>

                                  <execution>

                                      <id>integration-test</id>

                                      <goals>

                                          <goal>integration-test</goal>

                                          <goal>verify</goal>

                                      </goals>

                                  </execution>

                              </executions>

                          </plugin>

                      </plugins>

                  </build>

              </profile>

       

       

      Arquillian.xml

       

      <defaultProtocol type="Servlet 3.0" />

       

          <engine>

              <property name="deploymentExportPath">target/</property>

          </engine>

       

          <container qualifier="jboss_managed" default="true" >

              <protocol type="Servlet 3.0">

                  <property name="executionType">MANAGED</property>

              </protocol>

              <configuration>

                  <property name="outputToConsole">true</property>

                  <property name="jbossHome">${jboss.home}</property>

                  <property name="modulePath">${jboss.home.modules}</property>

                  <property name="serverConfig">standalone.xml</property>

                  <property name="javaVmArguments">${jacoco.arg} -Xmx512m -XX:MaxPermSize=128m</property>

                  <property name="startupTimeoutInSeconds">120</property>

                  <property name="allowConnectingToRunningServer">true</property>

              </configuration>

          </container>

       

      regards