2017-07-18 4 views
0

Je reçois cette erreur tout en faisant installer à partir Maven:défaut test d'exécution des org.apache.maven.plugins de but: maven-plugin-surefire: 2.17: test a échoué: Il y avait une erreur dans le processus fourchue

Étapes - Maven clean - Exécution correcte Maven Install - "[ERREUR] Échec d'exécution de l'objectif org.apache.maven.plugins: maven-surefire-plugin: 2.17: test (test par défaut) sur le projet com.learn .selenium: exécution par défaut test de org.apache.maven.plugins de but: maven-plugin-surefire: 2.17: test a échoué: Il y avait une erreur dans le processus fourchue »

Je suis un débutant à Selenium, toute aide serait vraiment apprécié, voici mon POM xml

**<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>com.learn</groupId> 
    <artifactId>com.learn.selenium</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
    <name>demo</name> 
    <description>demo</description> 
<properties> 
<suiteXmlFile>src/main/resources/testng.xml</suiteXmlFile> 

</properties> 
<dependencies> 
    <dependency> 
    <groupId>org.testng</groupId> 
    <artifactId>testng</artifactId> 
    <version>6.11</version> 
    <scope>test</scope> 
</dependency> 
<dependency> 
    <groupId>org.seleniumhq.selenium</groupId> 
    <artifactId>selenium-java</artifactId> 
    <version>3.4.0</version> 
</dependency> 
<dependency> 
    <groupId>org.apache.poi</groupId> 
    <artifactId>poi</artifactId> 
    <version>3.6</version> 
</dependency> 
<dependency> 
<groupId>org.apache.poi</groupId> 
<artifactId>poi-ooxml</artifactId> 
<version>3.6</version> 
</dependency> 
<dependency> 
<groupId>org.apache.poi</groupId> 
<artifactId>poi-ooxml-schemas</artifactId> 
<version>3.6</version> 
</dependency> 
<dependency> 
<groupId>dom4j</groupId> 
<artifactId>dom4j</artifactId> 
<version>1.1</version> 
</dependency> 
<dependency> 
<groupId>org.apache.xmlbeans</groupId> 
<artifactId>xmlbeans</artifactId> 
<version>2.3.0</version> 
</dependency> 
<dependency> 
      <groupId>com.relevantcodes</groupId> 
      <artifactId>extentreports</artifactId> 
      <version>2.40.1</version> 
     </dependency> 
<dependency> 
      <groupId>org.apache.maven.surefire</groupId> 
      <artifactId>surefire</artifactId> 
      <version>2.18.1</version> 
      <type>pom</type> 
     </dependency> 

    </dependencies> 
    <build> 

<plugins> 

<plugin> 

<groupId>org.apache.maven.plugins</groupId> 
<artifactId>maven-compiler-plugin</artifactId> 
<version>3.0</version> 
<configuration> 
<compilerVersion>1.8</compilerVersion> 
<source>1.6</source> 
<target>1.6</target> 
</configuration> 
</plugin> 

<plugin> 
<groupId>org.apache.maven.plugins</groupId> 
<artifactId>maven-surefire-plugin</artifactId> 
<version>2.17</version> 
<configuration> 

<suiteXmlFiles> 
<suiteXmlFile>${suiteXmlFile}</suiteXmlFile> 
</suiteXmlFiles> 

</configuration> 
</plugin> 
</plugins> 
</build> 
</project>** 

Répondre

2

je pense, vous devez mettre à jour la version maven-surefire-plugin à 2.19.1, si vous créez correctement suiteXmlFile. et besoin de spécifier le chemin réel de suiteXmlFile, par exemple: <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>. et si vous voulez utiliser <suiteXmlFile>${suiteXmlFile}</suiteXmlFile>, vous devez run mvn clean install test -DsuiteXmlFile=testngSuite.xml. pour plus, vous pouvez consulter les liens Bellow (document maven-Surefire-plugin):

http://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html

http://www.seleniumeasy.com/maven-tutorials/how-to-execute-selenium-webdriver-testng-xml-using-maven

+0

Salut, je me suis le même, problème était avec mon TestNG xml, une classe était là qui n'était pas présent dans le projet original. –

+0

ok ...................... – Sharma