Allure Dependency and Annotations
In this lesson, you'll learn about Allure's dependencies and annotations.
We'll cover the following...
Adding dependency
To use Gradle, we have to add the dependencies below to our project’s build file:
Gradle (in build.gradle
)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "io.qameta.allure:allure-gradle:2.8.1"
}
}
plugins {
id 'io.qameta.allure'
}
allure {
version = '2.13.1'
autoconfigure = true
aspectjweaver = true
clean = true
allureJavaVersion = "${allure.version}"
resultsDir = file('test-output/allure-results')
reportDir = file('test-output/allure-reports')
downloadLink = "https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/${allure.version}/allure-commandline-${allure.version}.zip"
}
Opening Allure report
To open the Allure report after test execution using Gradle, we can use the following command:
./gradlew allureServe
Maven (in pom.xml
)
<properties>
<aspectj.version>1.9.5</aspectj.version>
</properties>
<
...