2017-04-09 6 views
0

私は忠誠レポートを生成するコマンドmvn clean test siteコマンドを試しました。 xml fileallure-resultsフォルダ内はすべての手順で正しく作成されます。 Howvever、index.htmlファイル内site -> allure-maven-pluginフォルダが空です。概要またはAllureレポートで利用可能なその他のセクションにテストケースの結果は表示されません。私はSelenium WebDriverArquillianTestNGを使用しています。ステップで作成されたAllure XMLファイル。サイトのフォルダ内のIndex.htmlは空です - Allure Maven TestNG

<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ファイルを見つけてください。ありがとう。

答えて

0

上記のpom.xmlは正常に機能します。レポートを表示するデフォルトのブラウザのように見えるFirefoxです。 IEとchromeで開くと、index.htmlは空になります。結果はFirefoxブラウザに表示されます。このデフォルト構成を変更する方法を見つける必要があります。

関連する問題