0

Ich benutze die letzte Version von jacoco-maven-plugin (0.7.8) und letzte Version von arquillian-jacoco (1.0.0.Alpha9) aber beim Ausführen von IT-Test ich habe eine Stackoverflow in BeforeClass Arquillian (ich verwende maven, testng, Wildfly, jacoco, Arquillian alle in aktuellen Bibliotheken):Maven + Jacoco + Arquillian + TestNG IT-Test = stackoverflowError

Tests run: 12, Failures: 1, Errors: 0, Skipped: 11, Time elapsed: 54.616 sec  <<< FAILURE! - in com.real.hr.services.impl.test.PayEseConnectorServiceImplIT 
arquillianBeforeClass(com.real.hr.services.impl.test.PayEseConnectorServiceImplIT) Time elapsed: 54.263 sec <<< FAILURE! 
org.jboss.arquillian.container.spi.client.container.DeploymentException: Cannot deploy: arquillian-RflowHR.war 
Caused by: java.lang.Exception: 

"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"arquillian-RflowHR.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"arquillian-RflowHR.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"arquillian-RflowHR.war\" 
Caused by: java.lang.StackOverflowError" 

Gescheiterte Prüfungen: PayEseConnectorServiceImplIT> Arquillian.arquillianBeforeClass: 109 »Deployment

Wenn ich einen Kommentar:

<!-- jacoco --> 
<dependency> 
    <groupId>org.jboss.arquillian.extension</groupId> 
    <artifactId>arquillian-jacoco</artifactId> 
    <version>1.0.0.Alpha9</version> 
    <scope>test</scope> 
</dependency> 
<dependency> 
    <groupId>org.jacoco</groupId> 
    <artifactId>org.jacoco.core</artifactId> 
    <version>0.7.8</version> 
    <scope>test</scope> 
</dependency> 
</dependencies> 
<profiles> 
<profile> 
     <id>test-coverage</id> 
     <build> 
      <plugins> 
       <plugin> 
        <groupId>org.jacoco</groupId> 
        <artifactId>jacoco-maven-plugin</artifactId> 
        <version>0.7.8</version> 
        <executions> 
         <execution> 
         <goals> 
          <goal>prepare-agent</goal> 
         </goals> 
        </execution>    
        </executions> 
       </plugin> 

      </plugins> 
     </build> 
    </profile> 
    <profile> 
     <id>integration-tests-wildfly</id> 
     <build> 
      <plugins> 
      <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-plugin</artifactId> 
       <version>2.19.1</version> 
      </plugin> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-failsafe-plugin</artifactId> 
        <version>2.19.1</version> 
        <configuration> 
         <systemPropertyVariables> 
          <jboss.server.log.dir>${jboss.home.dir}/standalone/log</jboss.server.log.dir> 
          <arquillian.launch>jbossas-managed</arquillian.launch> 
          <jbossas.startup.timeout>240</jbossas.startup.timeout> 
         </systemPropertyVariables> 
         <includes> 
          <include>**/*IT.java</include> 
         </includes> 
        </configuration> 
        <executions> 
         <execution> 
          <goals> 
           <goal>integration-test</goal> 
           <goal>verify</goal> 
          </goals> 
         </execution> 
        </executions> 
       </plugin> 
      </plugins> 
     </build> 
     <dependencies> 
      <dependency> 
       <groupId>org.wildfly.arquillian</groupId> 
       <artifactId>wildfly-arquillian-container-managed</artifactId> 
       <version>2.0.2.Final</version> 
       <scope>test</scope> 
      </dependency> 
     </dependencies> 
    </profile> 

Jede Hilfe:

<dependency> 
    <groupId>org.jboss.arquillian.extension</groupId> 
    <artifactId>arquillian-jacoco</artifactId> 
    <version>1.0.0.Alpha9</version> 
    <scope>test</scope> 
</dependency> 
<dependency> 
    <groupId>org.jacoco</groupId> 
    <artifactId>org.jacoco.core</artifactId> 
    <version>0.7.8</version> 
    <scope>test</scope> 
</dependency> 

Es funktioniert gut, aber nicht Integrationstest wird unter meiner Konfiguration abgedeckt?

+0

vielleicht eine Ahnung ich in meinem ArquillianDeploymentHelper diesen Linien haben in der Instrumentierung eingesetzt werden: [] Libs Datei = pom.importDependencies (Bereiche) .resolve(). using (TransitiveStrategy.INSTANCE) .asFile(); \t \t \t \t WebArchive Archiv = ShrinkWrap.create (WebArchive.class, Archivname) \t \t \t \t .addAsLibraries (libs), ich glaube, in Server alle Bibliotheken Klasse Wich Ursache Stackoverflow zum Instrument jacoco versuche ich weiß nicht, wie zu konfigurieren, dass es nicht zur Laufzeit ausgeführt wird, da es auf dem jacoco-Bericht nicht alle Bibliotheken, sondern nur meine Testklassen gibt – cyril

Antwort

0

den folgenden Code in arquillian.xml Hinzufügen funktioniert für mich:

<extension qualifier="jacoco"> 
    <property name="includes">com.your.top.package.*</property> 
</extension> 

in der Tat nur Ihre Klassen

Verwandte Themen