【问题标题】:how to generate index.html- allure reporting- testng-maven-selenium webdriver如何生成 index.html-诱惑报告-testng-maven-selenium webdriver
【发布时间】:2017-09-20 06:54:51
【问题描述】:

我不熟悉引诱报道。我正在进行 selenium testng 测试并使用 maven 运行它们。 mvn test 之后,会生成一个 xml 文件 allure-result 文件夹。 谁能告诉我如何用这个生成 index.html 文件。我需要在 pom.xml 中添加一些东西吗?这是我的 pom.xml:

<properties>
    <allure.version>1.4.13</allure.version>
    <aspectj.version>1.8.10</aspectj.version>
</properties>
<dependencies>
    <dependency>
        <groupId>io.qameta.allure</groupId>
        <artifactId>allure-testng</artifactId>
        <version>2.0-BETA14</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-testng-adaptor</artifactId>
        <version>1.5.3</version>
        <exclusions>
            <exclusion>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.11</version>
        <scope>test</scope>
    </dependency>

    <build>
        <plugins>
            <plugin>
                 <groupId>io.qameta.allure</groupId>
                 <artifactId>allure-maven</artifactId>
                 <version>2.8</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20</version>
                <configuration>
                <argLine>
                    -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                </argLine>
                <suiteXmlFiles>
                    <suiteXmlFile>testng.xml</suiteXmlFile>
                </suiteXmlFiles>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>1.8.10</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>

<reporting>
    <excludeDefaults>true</excludeDefaults>
    <plugins>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>2.6</version>
            <configuration>
                  <outputDirectory>${basedir}/target/allure-reports/</outputDirectory>
                    <allureResultsDirectory>${basedir}/target/allure-results</allureResultsDirectory>
            </configuration>
        </plugin>
    </plugins>
</reporting>

我尝试运行 MVN 站点,但没有成功。 谢谢!!

【问题讨论】:

  • 在问题中添加您的 pom.xml。
  • 还添加您的 selenium 测试代码以及​​到目前为止您尝试过的内容
  • 在上面添加了 pom.xml

标签: maven selenium allure


【解决方案1】:

问题是您将旧报告(Allure 1)与新适配器(仅 Allure 2 支持)一起使用。

你可以在这里找到完整的文档https://docs.qameta.io/allure/2.0/#_testng

还有可用的工作示例https://github.com/allure-examples/allure-testng-example

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-05-14
    • 1970-01-01
    • 1970-01-01
    • 2017-11-07
    • 1970-01-01
    • 1970-01-01
    • 2021-08-12
    相关资源
    最近更新 更多