Allure turns raw test results into an interactive report: steps, attached requests and responses, severity, history and trends. For API suites its biggest advantage is the AllureRestAssured filter, which attaches every request and response to the test automatically, so a failed CI run shows exactly what was sent and received.

Allure + REST Assured Integration

<!-- pom.xml — Allure + RestAssured filter -->
<dependency>
    <groupId>io.qameta.allure</groupId>
    <artifactId>allure-rest-assured</artifactId>
    <version>2.26.0</version>
    <scope>test</scope>
</dependency>

// BaseApiTest.java — attach Allure filter to every request
@BeforeSuite
public static void globalSetup() {
    // Attach request/response to Allure automatically
    RestAssured.filters(
        new AllureRestAssured()          // logs request+response in Allure
            .setRequestTemplate("http-request.ftl")   // custom template
            .setResponseTemplate("http-response.ftl")
    );
}

// Annotate tests with Allure metadata
@Feature("Order Management")
@Story("Create Order")
@Severity(SeverityLevel.CRITICAL)
@Owner("naveed.khan")
@TmsLink("TC-ORDER-001")
@Issue("BUG-1234")
@Description("Verify that authenticated customer can create an order with valid items")
@Test
public void createOrder_authenticated_returns201() {
    Allure.step("Prepare order request", () -> {
        // test setup code
    });

    Allure.step("Send POST /api/orders", () -> {
        response = given().spec(withAuth("customer"))
            .body(TestDataFactory.validOrder())
        .when().post("/api/orders");
    });

    Allure.step("Verify 201 status and orderId in response", () -> {
        response.then()
            .statusCode(201)
            .body("id", notNullValue());

        // Attach response body as evidence
        Allure.addAttachment("Response Body", "application/json",
            response.getBody().asPrettyString(), ".json");
    });
}
Advertisement

Generating and Publishing Allure Reports

# Generate Allure report from test results
mvn test                                 # run tests (creates allure-results/)
mvn allure:report                        # generate HTML report → target/site/allure-maven-plugin/
mvn allure:serve                         # serve report on localhost:PORT (opens browser)

# GitHub Actions — publish Allure report to GitHub Pages
- name: Generate Allure Report
  uses: simple-elf/allure-publish-action@v1
  with:
    allure_results: allure-results
    allure_report:  allure-report
    gh_pages:       gh-pages
    allure_history: allure-history

# Allure report contains:
# - Suite breakdown (Feature/Story/Severity)
# - Timeline view (when each test ran)
# - History trend (pass rate over last N builds)
# - Full request + response body for every API call
# - Screenshots, logs, attachments
# - Flaky test detection (tests that pass sometimes)

Allure vs Extent Reports

AllureExtent Reports
SetupAdapter dependency + command-line or Maven plugin to generateCode-driven: you create the report and log steps
API request/response captureBuilt-in REST Assured filterManual logging
History and trendsYes, across runsLimited
Works withTestNG, JUnit, Cucumber, Playwright and moreMainly Java frameworks

To see the report locally, run allure serve target/allure-results after the tests; in CI, generate the static HTML and publish it as an artifact or with the Jenkins Allure plugin.

FAQs

How do you add request and response logs to Allure?

Add the allure-rest-assured dependency and register new AllureRestAssured() as a filter, globally with RestAssured.filters(...) or per request.

Where are Allure results stored?

Test runs write raw JSON results to allure-results (often under target/); the HTML report is generated from them with the Allure command line or Maven plugin.

How do you keep Allure history between CI runs?

Copy the history folder from the previous report into the new allure-results before generating; the Jenkins Allure plugin does this automatically.