Skip to content

tiwariswapnil/AllureReporting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Allure Reporting

Project Setup

Add the following plugin in pom:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.21.0</version>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                    <suiteXmlFiles>
                        <suiteXmlFile>testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                    <argLine>
                        -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                    </argLine>
                    <systemPropertyVariables>
                        <allure.results.directory>${project.build.directory}/allure-results</allure.results.directory>
                    </systemPropertyVariables>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

Then run the build as usual:

  1. mvn clean test

Allure results will appear in target/allure-results folder. To generate html report and automatically open it in a web browser, run the following command:

  1. allure serve target/allure-results

Configuration

Location of allure-results directory, and patterns for @TmsLink and @Issue links can be set by placing allure.properties file with following properties to resources directory: src/test/resources

allure.properties

1 allure.results.directory=target/allure-results
2 allure.link.issue.pattern=https://example.org/browse/{}
3 allure.link.tms.pattern=https://example.org/browse/{}

Or it can also be done by adding this in pom:

<systemPropertyVariables>
    <allure.results.directory>${project.build.directory}/allure-results</allure.results.directory>
</systemPropertyVariables>

About

Allure reporting using Cucumber TestNg runner

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published