How Allure is integrated
Allure is wired into the project through two components defined inpom.xml:
allure-cucumber7-jvm dependency — a Cucumber listener that converts each step execution into an Allure result file:
pom.xml
@Step and @Attachment annotations to work at runtime under Java 21. It is passed as a -javaagent argument to the JVM via maven-surefire-plugin:
pom.xml
TestRunner.java as a Cucumber plugin:
runners/TestRunner.java
Where results are stored
Aftermvn test, raw JSON result files are written to:
maven-surefire-plugin:
pom.xml
target/allure-results/ contains raw data only — not a viewable report. You need to generate the HTML report from these files using one of the methods below.Generating and viewing reports
- Maven plugin
- Allure CLI (Unix)
- Allure CLI (Windows)
The project includes the Serve a live report (opens automatically in your browser):
allure-maven plugin (version 2.12.0). Use it to generate a static HTML report or launch a local server.Generate a static report (written to target/site/allure-maven-plugin/):allure:serve generates the report and starts a temporary HTTP server. The browser opens automatically. Press Ctrl+C to stop the server.What the report includes
The Allure HTML report surfaces all of the information collected by theAllureCucumber7Jvm listener:
| Section | What you see |
|---|---|
| Overview | Total pass/fail/skip counts and a trend chart across runs |
| Behaviors | Scenarios grouped by Feature and Scenario name, mirroring your Gherkin structure |
| Step details | Each @Given/@When/@And/@Then step with pass/fail status and elapsed time |
| Timeline | A chronological view of all scenario executions |
| Categories | Failed tests grouped by failure type (product defect, test defect, etc.) |
Typical workflow
allure.properties configuration
You can add an allure.properties file to src/test/resources/ to customise Allure behaviour:
src/test/resources/allure.properties