GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — allure-java/allure-java-commons at main · allure-framework/allure-java

Expand file tree

/

allure-java-commons

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

allure-java-commons

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
README.md
README.md
 
 
build.gradle.kts
build.gradle.kts
 
 

README.md

Outline

allure-java-commons

Core runtime API for Allure Java.

Most Allure Report users receive this module transitively from a framework adapter such as allure-jupiter or allure-testng. Add it directly when you use the runtime API without a framework adapter or when you build a custom integration.

Supported Versions

  • Allure Java 3.x requires Java 17 or newer.
  • The runtime API is shared by all Allure Java adapters in the same release line.
  • The module bundles the JSON support it needs; users do not need to add Jackson for Allure result serialization.

Installation

Gradle:

dependencies {
    testImplementation(platform("io.qameta.allure:allure-bom:<allure-version>"))
    testImplementation("io.qameta.allure:allure-java-commons")
}

Maven, with allure-bom imported in dependency management:

<dependency>
    <groupId>io.qameta.allure</groupId>
    <artifactId>allure-java-commons</artifactId>
    <scope>test</scope>
</dependency>

Runtime API

Use io.qameta.allure.Allure for high-level steps, attachments, labels, links, and descriptions.

import io.qameta.allure.Allure;

Allure.step("Create order", () -> {
    Allure.attachment("request-id", "42");
});

High-level attachment APIs create attachment steps so attachments stay ordered with surrounding steps in Allure Report.

Preconditions and Expected Results

Report preconditions and expected results separately from the test description:

Allure.precondition("User is **logged in**");
Allure.expectedResult("**Dashboard** is displayed");

// Use explicit HTML for rich formatting.
Allure.preconditionHtml("<p>User is logged in</p>");
Allure.expectedResultHtml("<p>Dashboard is displayed</p>");

These helpers follow description metadata targeting: calls in a test update that test; calls in a before fixture provide scope defaults for its linked tests. Each field inherits independently, and explicit test values, including empty strings, take precedence over scope defaults. Calls outside a running executable or in an after fixture have no effect.

Markdown and HTML values are stored independently. When both are provided, HTML takes precedence in reports that support these fields, including Allure Report 3.

Annotation API

The module provides annotations such as @Step, @Attachment, @Owner, @Epic, @Feature, and @Story.

Annotations that need method interception, such as @Step and @Attachment, require the AspectJ weaver in the test JVM. Framework-specific adapters may also consume metadata annotations directly.

HTTP Exchange API

Use io.qameta.allure.http.HttpExchange when a custom integration needs to attach HTTP request and response details.

HttpExchange exchange = HttpExchange.builder()
        .redactHeader("X-Api-Key")
        .redactCookie("SESSION")
        .redactQueryParameter("token")
        .redactFormParameter("password")
        .setMaxBodySize(64 * 1024)
        .request("POST", "https://example.test/orders", request -> request
                .addHeader("X-Api-Key", "secret")
                .addQuery("token", "abc")
                .setBody(HttpExchangeBody.utf8("password=secret")))
        .response(response -> response
                .setStatus(200))
        .build();

Allure.addHttpExchange("HTTP exchange", exchange);

The builder applies redaction and truncation before the exchange is attached. Common credential headers such as Authorization, Proxy-Authorization, Cookie, and Set-Cookie are redacted by default.

Provides

  • Allure high-level runtime API.
  • AllureLifecycle for custom adapters and advanced result-writing workflows.
  • Lifecycle listener interfaces.
  • File-system result writer utilities.
  • HTTP request/response capture model.
  • Test-plan reader and selection helpers used internally by the framework adapters.

What To Expect

This module writes result data only when your code or an adapter calls the runtime API. In ordinary test suites, add a framework adapter first and use Allure.step(...), Allure.attachment(...), and metadata annotations for extra report detail.

Module Access

See Module API boundaries for public packages, shared internals, and dependency scopes.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.