Steps to add Allure Report into Cucumber-Selenide framework and Jenkins build

Recently I changed the report tool in automation framework from Extent Report to Allure Report, I would like to note down the list of steps I did to enable Allure Report.

In this post I am going to use the stack that my framework has. It is Cucumber JVM, JUnit, Selenide, Gradle. Depends on your framework stack, the steps may be a bit different.

First, Let’s take a look at Allure Report UI demo:

And here is why I love Allure Report:

  • Good user interface with nice graph and charts, get ‘big picture’ easier
  • Able to filter and search tests, easy to navigate the test
  • It can categorize product defects, test defects and also which test is flaky
  • Test history

I. Enable Allure Report in Cucumber framework

  • Add Allure Report dependencies in build.gradle or Maven pom.xml
  • Add Allure Plugin into Cucumber Test Runner configuration
  • Embed failure screenshot into scenario (not really related to Allure but nice to see screenshot for failed tests in Allure Report)

1. Add Allure Rerport dependencies

2. Add Allure Plugin into Cucumber Test Runner configuration

Cucumber JVM 7:

Cucumber JVM 4:

3. Embed failure screenshot into scenario

II. Open Allure Report When running tests in local

After the tests are executed, the allure-results folder will be created under project folder. You can open allure report by entering this command from the terminal:

thachhoang-mac cucumber_fw % allure serve allure-results

III. Enable Allure Report for Jenkins builds

1. Install the latest version of Allure Plugin from “Plugin Manager” page.

2. Configure Allure Commandline from “Global Tools Configuration”.

3. If you created the automation pipeline using classic Jenkins UI, Add Allure in post build action to generate the report.

  • Open job configuration page.
  • Add Allure Report post build action.
Select
  • Configure the Allure Report.
install allure commanline

4. If you created automation pipeline script or jenkinsfile from SCM, add step to configure the Allure Report.

When you are done those steps above, next run you will see Allure Report button like this in the build:

Reference links:

https://docs.qameta.io/allure/#_jenkins

https://www.jenkins.io/doc/pipeline/steps/allure-jenkins-plugin/#allure-allure-report

Leave a comment