4
votes

I am unable to generate Allure test html reports using allure-maven plugin. I am using the same version of testNG-adapter and allure maven plugin (1.4.0.RC8). But I am able to generate the allure html reports using Allure CLI. My pom.xml excluding dependencies is

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.14</version>
        <configuration>
            <testFailureIgnore>false</testFailureIgnore>
            <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>1.8.1</version>
            </dependency>

        </dependencies>

</plugin>
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
    <plugin>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-maven-plugin</artifactId>
        <version>1.4.0.RC8</version>
       <configuration>
            <outputDirectory>${basedir}/target/allure-reports/</outputDirectory>
            <allureResultsDirectory>${basedir}/target/allure-results</allureResultsDirectory>
        </configuration>
    </plugin>
</plugins>
</reporting>
2
Could you clarify which command are you typing to generate report? - vania-pooh
I am using mvn clean test command - JavaCreeper
You also need to run: $ mvn site after that. This command actually generates report. - vania-pooh

2 Answers

0
votes

As you are not showing full POM, this example you can follow to make sure all plugin & property is correct.

https://github.com/sarkershantonu/Automation-Getting-Started/blob/master/AllureJunit/pom.xml

And, for command.. Testing => mvn clean test

Generating report => mvn site

Now, if you are running in CI servers, that need allure plugins to show report but if you are running locally, use jetter server (see my POM)

To see report via jettey : mvn jetty:run