Java Maven build上不会生成诱惑结果

Java Maven build上不会生成诱惑结果,java,maven,selenium,junit,allure,Java,Maven,Selenium,Junit,Allure,我正在用Maven运行一个Selenium测试,希望在最后生成一个诱惑报告。不幸的是,我收到了一条错误消息 Maven命令行: clean -Dtest=TestLogs test allure:report 错误消息: [INFO] --- allure-maven:2.9:report (default-cli) @ demo --- [INFO] Allure installation directory C:\Users\Zoe\Documents\demo\selenium_test

我正在用Maven运行一个Selenium测试,希望在最后生成一个诱惑报告。不幸的是,我收到了一条错误消息

Maven命令行:

clean -Dtest=TestLogs test allure:report
错误消息:

[INFO] --- allure-maven:2.9:report (default-cli) @ demo ---
[INFO] Allure installation directory C:\Users\Zoe\Documents\demo\selenium_tests\demo_selenium/.allure
[INFO] Try to finding out allure 2.3.1
[INFO] Generate Allure report (report) with version 2.3.1
[INFO] Generate Allure report to C:\Users\Zoe\Documents\demo\selenium_tests\demo_selenium\target\site/allure-maven-plugin 
[ERROR] Directory C:\Users\Zoe\Documents\demo\selenium_tests\demo_selenium\target\target\allure-results not found.
[WARNING] Allure report was skipped because there is no results directories found.
My POM.xml:

<project
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
        xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<modelVersion>4.0.0</modelVersion>

<groupId>org.wesh.nc</groupId>
<artifactId>demo</artifactId>
<!--<packaging>pom</packaging>-->
<packaging>jar</packaging>
<version>1.0</version>

<properties>
    <allure.version>1.5.2</allure.version>
    <allure.maven.version>2.0</allure.maven.version>
</properties>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.20.1</version>
            <configuration>
                <skip>${skip.selenium.tests}</skip>
                <parallel>none</parallel>
                <threadCount>1</threadCount>
                <reuseForks>false</reuseForks>
                <disableXmlReport>false</disableXmlReport>
            </configuration>
            <executions>
                <execution>
                    <id>runSeleniumTests</id>
                    <phase>integration-test</phase>
                    <goals>
                        <goal>integration-test</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-maven</artifactId>
            <version>2.9</version>
            <configuration>
                <resultsDirectory>target\allure-results</resultsDirectory>
                <inputDirectories>target\allure-results</inputDirectories>
                <outputDirectory>target\allure-report</outputDirectory>
                <reportVersion>2.3.1</reportVersion>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>${allure.maven.version}</version>
            <configuration>
                <resultsPattern>target\allure-results</resultsPattern>
                <outputDirectory>target\target-report</outputDirectory>
            </configuration>

            <executions>
                <execution>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

<dependencies>
    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>2.4.7</version>
    </dependency>
    <dependency>
        <groupId>org.gebish</groupId>
        <artifactId>geb-core</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>org.gebish</groupId>
        <artifactId>geb-spock</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>org.spockframework</groupId>
        <artifactId>spock-core</artifactId>
        <version>1.0-groovy-2.4</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-remote-driver</artifactId>
        <version>3.8.0</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-firefox-driver</artifactId>
        <version>3.8.0</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.8.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
    </dependency>
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>2.0</version>
    </dependency>
    <dependency>
        <groupId>pl.pragmatists</groupId>
        <artifactId>JUnitParams</artifactId>
        <version>1.1.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.pdfbox</groupId>
        <artifactId>pdfbox</artifactId>
        <version>2.0.6</version>
    </dependency>
    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.6</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-maven-plugin</artifactId>
        <version>${allure.maven.version}</version>
    </dependency>
    <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-commons</artifactId>
        <version>${allure.version}</version>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-report-data</artifactId>
        <version>${allure.version}</version>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-java-adaptor-api</artifactId>
        <version>${allure.version}</version>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-model</artifactId>
        <version>${allure.version}</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.6</version>
    </dependency>
</dependencies>

<reporting>
    <excludeDefaults>true</excludeDefaults>
    <plugins>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>${allure.maven.version}</version>
            <configuration>
                <outputDirectory>target/allure-report</outputDirectory>
            </configuration>
        </plugin>
    </plugins>
</reporting>
我知道这个POM很混乱,我一直在尝试一些事情,以使诱惑的工作


如果有人知道我可以如何生成allure结果目录,请提前感谢。

您错过了allure listener和AspectJ配置。请按照文档页面中的说明进行操作:


也可以考虑升级到最新的诱惑版本。新版本的文档可以在这里找到

您错过了诱惑侦听器和AspectJ配置。请按照文档页面中的说明进行操作:


也可以考虑升级到最新的诱惑版本。新版本的文档可以在这里找到

谢谢,我明天会试试。我会让你保持更新,并接受你的答案,如果你想得到我美丽的诱惑日志:注意未来的自我:假->把这变成真的,因为如果没有,诱惑报告将不会生成测试失败,这是太糟糕了,因为你将特别需要一个报告,如果测试是KO。谢谢,我会尝试明天。我会让你保持更新,并接受你的答案,如果你想得到我美丽的诱惑日志:注意未来的自我:假->把这变成真的,因为如果没有,诱惑报告将不会生成如果测试失败,这是太糟糕了,因为你将特别需要一个报告,如果测试失败。