6 Replies Latest reply on Mar 16, 2015 10:39 AM by Jean Revertera

    Jacoco extension does not work with gradle

    Ivan Macalak Newbie

      Hallo,

       

      I'd like to measure a code coverage during Arquillian integration tests. I use gradle to build my application and execute Arquillian tests.

      I have jacoco and arquillian-jacoco:1.0.0.Alpha6 inclued on test runtime classpath. My arquillian.xml looks like following:

       

      <?xml version="1.0"?>

      <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                  xmlns="http://jboss.org/arquillian-1.0"

                  xsi:schemaLocation="http://jboss.org/arquillian-1.0 http://jboss.org/schema/arquillian/arquillian-1.0.xsd">

       

        <defaultProtocol type="Servlet 3.0"/>

       

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

            <configuration>

               <property name="jbossHome">../../runtime/jboss-eap-6.3.0.Alpha/</property>

               <property name="javaVmArguments">-Dproject.phase=integration -Xmx768m -XX:MaxPermSize=256m</property>

               <property name="managementPort">10999</property>

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

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

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

            </configuration>

         </container>

         <extension qualifier="jacoco">

          <property name="includes">my-package.*</property>

        </extension>

      </arquillian>

       

      Should this setup work, or is the jacoco extension integrated with maven only?

      How can I detect, if jacoco is active during test execution?

       

      Thanks,

      Ivan.