2017-01-09 4 views
0

Ich mache eine POC, um den Allure-Bericht über Maven mit TestNG zu implementieren. Ich bin erfolgreich in der Lage, es zu implementieren, aber der erstellte Bericht ist leer ohne irgendwelche Informationen über den erfolgreichen Build.Allure Report html generiert leer

Hier finden Sie meine POM-Datei.

http://maven.apache.org/xsd/maven-4.0.0.xsd "> 4.0.0

<groupId>com.org.cboe</groupId> 
<artifactId>allurePOC</artifactId> 
<version>0.0.1-SNAPSHOT</version> 
<packaging>jar</packaging> 
<!-- Project information and dependencies --> 
<name>allurePOC</name> 
<url>http://maven.apache.org</url> 

<properties> 
    <jetty.http.port>9000</jetty.http.port> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    <allure.version>1.4.24.RC3</allure.version> 
    <aspectj.version>1.8.9</aspectj.version> 
</properties> 

<dependencies> 


    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.11</version> 
     <scope>test</scope> 
    </dependency> 

    <dependency> 
     <groupId>org.testng</groupId> 
     <artifactId>testng</artifactId> 
     <version>6.9.11</version> 
     <scope>test</scope> 
    </dependency> 

    <dependency> 
     <groupId>org.apache.poi</groupId> 
     <artifactId>poi</artifactId> 
     <version>3.14</version> 
    </dependency> 

    <dependency> 
     <groupId>org.apache.poi</groupId> 
     <artifactId>poi-ooxml</artifactId> 
     <version>3.14</version> 
    </dependency> 


    <dependency> 
     <groupId>org.apache.poi</groupId> 
     <artifactId>poi-scratchpad</artifactId> 
     <version>3.14</version> 
    </dependency> 

    <dependency> 
     <groupId>org.apache.poi</groupId> 
     <artifactId>poi-ooxml-schemas</artifactId> 
     <version>3.14</version> 
    </dependency> 

    <dependency> 
     <groupId>org.apache.poi</groupId> 
     <artifactId>poi-excelant</artifactId> 
     <version>3.14</version> 
    </dependency> 

    <dependency> 
     <groupId>org.seleniumhq.selenium</groupId> 
     <artifactId>selenium-java</artifactId> 
     <version>3.0.1</version> 
    </dependency> 

    <dependency> 
     <groupId>org.seleniumhq.selenium</groupId> 
     <artifactId>htmlunit-driver</artifactId> 
     <version>2.23</version> 
    </dependency> 
    <dependency> 
     <groupId>org.seleniumhq.selenium</groupId> 
     <artifactId>selenium-server</artifactId> 
     <version>3.0.1</version> 
    </dependency> 



    <dependency> 
     <groupId>org.apache.logging.log4j</groupId> 
     <artifactId>log4j-api</artifactId> 
     <version>2.7</version> 
    </dependency> 

    <dependency> 
     <groupId>org.apache.logging.log4j</groupId> 
     <artifactId>log4j-core</artifactId> 
     <version>2.7</version> 
    </dependency> 
    <!-- Allure dependencies --> 
    <dependency> 
     <groupId>ru.yandex.qatools.allure</groupId> 
     <artifactId>allure-junit-adaptor</artifactId> 
     <version>${allure.version}</version> 

    </dependency> 

    <dependency> 
     <groupId>ru.yandex.qatools.allure</groupId> 
     <artifactId>allure-testng-adaptor</artifactId> 
     <version>${allure.version}</version> 
    </dependency> 
</dependencies> 

<!-- Project Build information and dependencies --> 

<build> 

    <plugins> 

     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>3.3</version> 

      <configuration> 
       <fork>true</fork> 
       <source>1.8</source> 
       <target>1.8</target> 
       <executable>C:\Program Files\Java\jdk1.8.0_111\bin\javac.exe</executable> 
      </configuration> 

     </plugin> 

     <plugin> 

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

      <dependencies> 
       <dependency> 
        <groupId>org.apache.maven.surefire</groupId> 
        <artifactId>surefire-junit47</artifactId> 
        <version>2.18.1</version> 
       </dependency> 
       <dependency> 
        <groupId>org.apache.maven.surefire</groupId> 
        <artifactId>surefire-testng</artifactId> 
        <version>2.18.1</version> 
       </dependency> 
      </dependencies> 
      <configuration> 
       <threadCount>1</threadCount> 
       <!-- <properties> <property> <name>listener</name> <value>ru.yandex.qatools.allure.junit.AllureRunListener</value> 
        </property> </properties> --> 
      </configuration> 


     </plugin> 

     <plugin> 

      <groupId>org.eclipse.jetty</groupId> 
      <artifactId>jetty-maven-plugin</artifactId> 
      <version>9.3.7.v20160115</version> 
      <configuration> 
       <webAppSourceDirectory> 
        ${project.build.directory}/site/allure-results 
       </webAppSourceDirectory> 
       <httpConnector> 
        <port>${jetty.http.port}</port> 
       </httpConnector> 
       <stopKey>stop</stopKey> 
       <stopPort>1234</stopPort> 
      </configuration> 

     </plugin> 

    </plugins> 

</build> 

<!-- Project reporting --> 

<reporting> 

    <excludeDefaults>true</excludeDefaults> 
    <plugins> 
     <plugin> 
      <groupId>ru.yandex.qatools.allure</groupId> 
      <artifactId>allure-maven-plugin</artifactId> 
      <version>2.5</version> 
      <configuration> 
       <reportDirectory> ${project.build.directory}/site/allure-results</reportDirectory> 

       <!-- <resultsDirectory></resultsDirectory> --> 

      </configuration> 

     </plugin> 



    </plugins> 

</reporting> 

Antwort

0

Sie benötigen aspectj Weber als javaagent hinzuzufügen. siehe FAQ-and-Troubleshooting:

Sie nicht die -javaagent JVM-Argument angegeben haben diese obligatorisch ist, wenn mit Schritten arbeiten, Anhänge und Parameter, weil wir verwenden. AspectJ, um sie zu verarbeiten.

Lösung :: Stellen Sie sicher, dass die JVM mit -javaagent Pfad/zu/aspectj-weaver.jar gestartet wird. Sehen Sie das Beispiel, wie dies mit Maven gemacht wird.

Verwandte Themen