Like Extent Adapter, Allure Adapter is also used to generate Cucumber reports. In this Tutorial we are using Cucumber 7.2.3 with allure Adapter version 2.17.2
Note: Please add dependency and plugin corresponding to your cucumber version.
Cucumber Allure Report Java
Step 1: Add following Maven dependency or you can check the latest one from here for Cucumber Version 7
<!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-cucumber7-jvm -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-cucumber7-jvm</artifactId>
<version>2.17.2</version>
</dependency>
For previous versions:
Step 2: Add following plugin in Test Runner Class:
plugin = { "pretty", "io.qameta.allure.cucumber7jvm.AllureCucumber7Jvm"}
For previous version select any one:
plugin = { "pretty", "io.qameta.allure.cucumber6jvm.AllureCucumber6Jvm"}
plugin = { "pretty", "io.qameta.allure.cucumber5jvm.AllureCucumber5Jvm"}
plugin = { "pretty", "io.qameta.allure.cucumber4jvm.AllureCucumber4Jvm"}
Step 3: Execute your test using maven test
mvn test
Step 4: Navigate to your project directory and type
allure serve allure-results
A browser window will open which will display allure report.
- Log in to post comments