使用步骤创建的 Allure xml 个文件。 Index.html 内部站点文件夹为空 - Allure Maven TestNG

Allure xml files created with steps. Index.html inside site folder is empty - Allure Maven TestNG

我试过命令 mvn clean test site 命令来生成诱惑报告。 xml file 内的 allure-results 文件夹已通过所有步骤正确创建。但是,index.html 文件夹中的 site -> allure-maven-plugin 文件是空的。概述或 Allure 报告中可用的任何其他部分没有显示测试用例结果。我正在使用 Selenium WebDriverArquillianTestNG.

请在下面找到我的 POM 文件:

<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>ABC</groupId>
  <artifactId>XYZ</artifactId>
  <version>0.0.1-SNAPSHOT</version>
   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <version.org.jboss.arquillian>1.1.12.Final</version.org.jboss.arquillian>
      <version.org.jboss.arquillian.drone>2.1.0.Alpha1</version.org.jboss.arquillian.drone>
      <version.org.jboss.arquillian.graphene>2.1.0.Final</version.org.jboss.arquillian.graphene>
      <version.screenshooter>2.1.0.Final</version.screenshooter>
      <version.javax.mail>1.5.6</version.javax.mail>
      <jackson.version>2.7.0</jackson.version>
      <aspectj.version>1.8.3</aspectj.version>
      <allure.version>1.4.11</allure.version>
      <version.maven.surefire>2.19.1</version.maven.surefire>
   </properties>
  <dependencies>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.11</version>
    </dependency>
        <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-testng-adaptor</artifactId>
        <version>${allure.version}</version>
        <exclusions>
            <exclusion>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
    </dependency>
     <dependency>
         <groupId>org.jboss.arquillian.testng</groupId>
         <artifactId>arquillian-testng-standalone</artifactId>
         <scope>test</scope>
      </dependency>  
    <dependency>
         <groupId>org.jboss.arquillian.graphene</groupId>
         <artifactId>graphene-webdriver</artifactId>
         <version>${version.org.jboss.arquillian.graphene}</version>
         <type>pom</type>
         <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.jboss.arquillian.graphene</groupId>
        <artifactId>arquillian-browser-screenshooter</artifactId>
        <version>${version.screenshooter}</version>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.8.0</version>
    </dependency>
    <dependency>
        <groupId>com.github.jsurfer</groupId>
        <artifactId>jsurfer-core</artifactId>
        <version>1.2.8</version>
    </dependency>
    <dependency>
        <groupId>com.sun.mail</groupId>
        <artifactId>javax.mail</artifactId>
        <version>${version.javax.mail}</version>
        <scope>test</scope>
    </dependency>
  </dependencies>
  <dependencyManagement>
      <dependencies>
         <!-- Arquillian Core dependencies -->
         <dependency>
            <groupId>org.jboss.arquillian</groupId>
            <artifactId>arquillian-bom</artifactId>
            <version>${version.org.jboss.arquillian}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
         <!-- Arquillian Drone dependencies and WebDriver/Selenium dependencies -->
         <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-bom</artifactId>
            <version>${version.org.jboss.arquillian.drone}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
      </dependencies>
   </dependencyManagement>
   <build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${version.maven.surefire}</version>
            <configuration>
                <testFailureIgnore>false</testFailureIgnore>
                <argLine>
                    -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                </argLine>
                 <suiteXmlFiles>
                     <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                  </suiteXmlFiles>
                  <properties>
                    <property>
                        <name>listener</name>
                        <value>ru.yandex.qatools.allure.testng.AllureTestListener</value>
                    </property>
                  </properties>
            </configuration>   
            <dependencies>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>${aspectj.version}</version>
                </dependency>
            </dependencies>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.6.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
         </plugin>
    </plugins>
   </build>
   <reporting>
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-maven-plugin</artifactId>
                <version>1.4.0</version>
                <configuration>
                    <outputDirectory>${basedir}/target/allure-reports/</outputDirectory>
                    <allureResultsDirectory>${basedir}/target/allure-results</allureResultsDirectory>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>

请指导我。谢谢。

以上 pom.xml 工作正常。看起来查看报告的默认浏览器是 Firefox。当在 IE 中打开并且 chrome 时,index.html 显示为空。结果显示在 firefox 浏览器中。需要找到更改此默认配置的方法。