Skip to content

oyang/allure-gradle-junit-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Allure Gradle JUnit Example

This example demonstrates how to use Allure JUnit adaptor with Gradle build tool.

Usage

To launch this example install Gradle and run the following command from the root directory:

$ gradle

You should see failed tests and generated Allure XML files in build/allure-results directory.

Report

To generate report allure-cli can be used.

Report generation example:

# Run from the root directory
$ allure generate build/allure-results -v 1.4.11 -o build/reports/allure

Open report example:

$ allure report open -o build/reports/allure

Automate with Gradle

Report generation can be automated with gradle.

Example:

task generateAllureReport(type: Exec) {
    commandLine "allure generate build/allure-results -v ${allureVersion} -o build/reports/allure"
}
test.finalizedBy(generateAllureReport)

task openAllureReport(type: Exec) {
    commandLine "allure report open -o build/reports/allure"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%