小编shi*_*mar的帖子

Allure/TestNG/Maven:org.testng.ITestNGListener:Provider io.qameta.allure.testng.AllureTestNg无法实例化

我正在尝试将Allure整合到我的Maven项目中.这是我到目前为止所做的: - 安装了一个命令行并设置了类路径.作为验证的一部分,当我在控制台中运行诱惑--version时,我得到了2.4.1.- 我按照https://docs.qameta.io/allure/latest/#_testng上的说明操作, 并对那里提到的POM进行了更改.这是我的POM:

<?xml version="1.0" encoding="UTF-8"?>
<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.testautomation</groupId>
<artifactId>com.testautomation.selenium</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>

    <suiteXmlFile>src/main/resources/testng.xml</suiteXmlFile>
    <webdriver.chrome>src/main/resources/chromedriver.exe</webdriver.chrome>
    <aspectj.version>1.8.10</aspectj.version>
    <allure.version>1.5.4</allure.version>
    <!--<maven.surefire.plugin.version>2.20</maven.surefire.plugin.version>-->

</properties>

<dependencies>

    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.9.5</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.6.0</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-support</artifactId>
        <version>2.53.1</version>
    </dependency>
    <dependency>
        <groupId>io.qameta.allure</groupId>
        <artifactId>allure-testng</artifactId>
        <version>2.0-BETA19</version>
        <scope>test</scope>
    </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.20</version>
            <configuration>
                <systemPropertyVariables>
                    <webdriver.chrome.driver>${webdriver.chrome}</webdriver.chrome.driver>
                </systemPropertyVariables>
                <argLine>
                    -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                </argLine>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>${aspectj.version}</version>
                </dependency> …
Run Code Online (Sandbox Code Playgroud)

selenium maven allure

0
推荐指数
1
解决办法
3710
查看次数

标签 统计

allure ×1

maven ×1

selenium ×1