0 Replies Latest reply on Jul 9, 2013 7:36 AM by kgoedert

    jacoco coverage and arquillian core 1.1.0 final

    kgoedert

      Hi

       

      I am trying to setup jacoco coverage on a project using arquillian core 1.1.0 final. In my project I have the tests from the arquillian guides. The GreeterTest and the test using drone. They work inside eclipse and from the console.

      But when I run them with the profile that has the maven-jacoco plugin, which is like this:

       

       

      {code}

       

      <version.jacoco>0.6.0.201210061924</version.jacoco>

       

      <profile>

                                    <id>jacoco</id>

                                    <dependencies>

                                              <dependency>

                                                        <groupId>org.jacoco</groupId>

                                                        <artifactId>org.jacoco.agent</artifactId>

                                                        <classifier>runtime</classifier>

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

                                                        <scope>test</scope>

                                              </dependency>

                                    </dependencies>

                                    <build>

                                              <plugins>

                                                        <plugin>

                                                                  <groupId>org.jacoco</groupId>

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

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

                                                                  <executions>

                                                                            <execution>

                                                                                      <id>prepare-agent</id>

                                                                                      <goals>

                                                                                                <goal>prepare-agent</goal>

                                                                                      </goals>

                                                                            </execution>

                                                                            <execution>

                                                                                      <id>report</id>

                                                                                      <phase>prepare-package</phase>

                                                                                      <goals>

                                                                                                <goal>report</goal>

                                                                                      </goals>

                                                                            </execution>

                                                                  </executions>

                                                        </plugin>

                                              </plugins>

                                    </build>

                          </profile>

       

      {code}

       

      I get the following error:

       

       

       

      {code}

      Running com.example.project.view.GreeterTest

      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.003 sec <<< FAILURE!

      com.example.project.view.GreeterTest  Time elapsed: 0.003 sec  <<< ERROR!

      java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor

                at java.net.URLClassLoader$1.run(URLClassLoader.java:217)

                at java.security.AccessController.doPrivileged(Native Method)

                at java.net.URLClassLoader.findClass(URLClassLoader.java:205)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:321)

                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:266)

                at java.lang.Class.getDeclaredConstructors0(Native Method)

                at java.lang.Class.privateGetDeclaredConstructors(Class.java:2416)

                at java.lang.Class.getConstructor0(Class.java:2726)

                at java.lang.Class.getDeclaredConstructor(Class.java:2004)

                at org.jboss.arquillian.core.impl.SecurityActions$1.run(SecurityActions.java:182)

                at org.jboss.arquillian.core.impl.SecurityActions$1.run(SecurityActions.java:179)

                at java.security.AccessController.doPrivileged(Native Method)

                at org.jboss.arquillian.core.impl.SecurityActions.getConstructor(SecurityActions.java:178)

                at org.jboss.arquillian.core.impl.SecurityActions.newInstance(SecurityActions.java:152)

                at org.jboss.arquillian.core.impl.Reflections.createInstance(Reflections.java:122)

                at org.jboss.arquillian.core.impl.ManagerImpl.createExtensions(ManagerImpl.java:410)

                at org.jboss.arquillian.core.impl.ManagerImpl.fireProcessing(ManagerImpl.java:345)

                at org.jboss.arquillian.core.impl.ManagerImpl.<init>(ManagerImpl.java:98)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:532)

                at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:156)

                at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:111)

                at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:97)

                at org.jboss.arquillian.core.spi.ManagerBuilder.create(ManagerBuilder.java:77)

                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(EventTestRunnerAdaptor.java:55)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:532)

                at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:156)

                at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:111)

                at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:97)

                at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)

                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:93)

                at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)

                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)

                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)

      {code}

       

       

       

      on all the tests. The version of jacoco I am using is 1.0.0.Alpha5. Is this the correct way to setup jacoco? Should this version of jacoco work with arquillian core 1.1.0 final?