Hello!
It was not the first day that I was struggling with the problem, I hoped to solve the questions I had already asked, but it didn’t work out ... It consists of the following: an attempt to connect the allure report to the project was not crowned with success. I tried different spellings of pom.xml, but all is in vain.

Everything was done according to the model, but almost always the error was that when trying to create a report, a warning appeared that it could not be created, because the allure-results directory was not found or the input directory was not correct .

Here is my pom.xml :

<?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.ponamorev.testproject</groupId> <artifactId>testproject</artifactId> <version>1.0-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <allure.version>2.0-BETA20</allure.version> <aspectj.version>1.8.10</aspectj.version> <junit.version>4.11</junit.version> <project.build.source>1.8</project.build.source> </properties> <dependencies> <dependency> <groupId>io.qameta.allure</groupId> <artifactId>allure-junit4</artifactId> <version>${allure.version}</version> <scope>test</scope> <exclusions> <exclusion> <groupId>junit</groupId> <artifactId>junit</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.9.1</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> </dependency> <dependency> <groupId>io.qameta.allure</groupId> <artifactId>allure-java-commons</artifactId> <version>${allure.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>1.8.0-beta1</version> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.0</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.7.0</version> <configuration> <target>${project.build.source}</target> <source>${project.build.source}</source> <encoding>${project.build.sourceEncoding}</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.20</version> <configuration> <testFailureIgnore>false</testFailureIgnore> <argLine> -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar </argLine> <systemProperties> <property> <name>allure.results.directory</name> <value>${basedir}/target/allure-results</value> </property> </systemProperties> <properties> <property> <name>listener</name> <value>io.qameta.allure.junit4.AllureJunit4</value> </property> </properties> </configuration> <dependencies> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>${aspectj.version}</version> </dependency> </dependencies> </plugin> <plugin> <groupId>io.qameta.allure</groupId> <artifactId>allure-maven</artifactId> <version>2.8</version> <configuration> <propertiesFilePath>${basedir}/src/test/resources/allure.properties</propertiesFilePath> <reportVersion>2.4.0</reportVersion> <reportDirectory>${basedir}/target/allure-report</reportDirectory> <resultsDirectory>${basedir}/target/allure-results</resultsDirectory> </configuration> </plugin> </plugins> </build> <reporting> <excludeDefaults>true</excludeDefaults> <plugins> <plugin> <groupId>io.qameta.allure</groupId> <artifactId>allure-maven</artifactId> <version>2.8</version> <configuration> <propertiesFilePath>src/test/resources/allure.properties</propertiesFilePath> <reportVersion>2.4.0</reportVersion> <reportDirectory>${basedir}/target/allure-report</reportDirectory> <resultsDirectory>${basedir}/target/allure-results</resultsDirectory> </configuration> </plugin> </plugins> </reporting> </project> 

The tests are run using the mvn clean test command.
Attempts to create a report through various commands: mvn site , mvn allure: serve , mvn allure: report
Tell me where it’s wrong, my eyes are already zamylilis, probably I can not understand it in any way.

    2 answers 2

    you have reportDirectory and reportDirectory however. It is necessary that one points to a specific directory, and the second contains the folder name

     <plugin> <groupId>ru.yandex.qatools.allure</groupId> <artifactId>allure-maven-plugin</artifactId> <configuration> <resultsDirectory>allure-results</resultsDirectory> <reportDirectory>${basedir}/target/</reportDirectory> </configuration> </plugin> 

    and in reporting you can only leave

     <reporting> <outputDirectory>${basedir}/target/allure-results</outputDirectory> </reporting> 
    • Thanks for the answer. Yes, now the folder allure-results is created, but the report is empty. Tried to make a report through mvn allure:serve , mvn allure:report and allure generate . All options are unsuccessful. Not sure how to fix this? Maybe somewhere something is not specified? - Vyacheslav P.
    • perhaps due to the fact that there is no allure-report-builder in dependencies - Senior Pomidor
    • In allure 2 did not find such a relationship .. - Vyacheslav P.
    • I'm not sure. Link - Senior Pomidor
    • I changed allure 2 to allure 1. I allure-junit-adaptor version 1.5.4, allure-report-builder version 2.0. In the <reporting> section indicated allure-maven-plugin version 2.0. For the builder and the maven, there is no 1.5.4 plugin, there from 1.4.0 immediately to 2.0 there is an upgrade. Still not created folder allure-results :( - Vyacheslav P.

    I was helped by the complete removal of the configuration section from the allure-maven plugin.
    Only the path in the surefire: ${project.build.directory}/allure-results configuration is surefire: ${project.build.directory}/allure-results

    Check that in the target/allure-results surefire plugin really puts the reports after running the tests.

    PS I run from IDEA on clean test and allure: serve