百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

allure-java

> 编程语言
开源

Allure 与 Java 测试框架的集成

374 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Allure 与 Java 测试框架的集成

Allure Java

Allure Java is the JVM integration family for Allure Report. It helps Java, Groovy, Scala, Kotlin, and other JVM test suites write Allure result files that can be viewed in Allure Report.

Requirements

  • Allure Java 3.x targets Java 17 and newer.
  • Use one framework adapter per test runtime, for example allure-jupiter, allure-testng, or allure-cucumber7-jvm.
  • Prefer allure-bom to keep Allure module versions aligned.

Quick Start

Gradle:

kotlin
dependencies {
    testImplementation(platform("io.qameta.allure:allure-bom:"))
    testImplementation("io.qameta.allure:allure-jupiter")
}

tasks.test {
    useJUnitPlatform()
}

Maven:

xml

    
        
            io.qameta.allure
            allure-bom
            ${allure.version}
            pom
            import
        
    

    
        io.qameta.allure
        allure-jupiter
        test
    

Run your tests, then generate or serve the report from the produced Allure results directory, usually build/allure-results for Gradle or target/allure-results for Maven.

Module Catalog

Test Frameworks

Module Use When Registration
allure-jupiter JUnit Jupiter on JUnit 5 or 6 JUnit Platform service loader
allure-junit-platform Building a custom JUnit Platform integration JUnit Platform listener and filter services
allure-junit4 JUnit 4 runner where listeners can be configured Register io.qameta.allure.junit4.AllureJunit4
allure-junit4-aspect Gradle built-in JUnit 4 execution Enable AspectJ weaver
allure-testng TestNG 7 suites TestNG service loader or listener registration
allure-spock2 Spock 2 specifications Spock global extension service
allure-scalatest ScalaTest suites ScalaTest reporter
allure-cucumber7-jvm Cucumber JVM 7 Cucumber plugin
allure-jbehave5 JBehave 5 stories JBehave story reporter
allure-karate Karate runtime listeners Karate runtime listener
allure-citrus Citrus tests Citrus listeners

HTTP, Browser, And Client Integrations

Module Use When Captured Data
allure-rest-assured REST Assured filters HTTP requests and responses
allure-java-httpclient Java built-in HttpClient wrapper HTTP requests and responses
allure-httpclient5 Apache HttpClient 5 interceptors HTTP requests and responses
allure-httpclient Apache HttpClient 4 interceptors HTTP requests and responses
allure-okhttp3 OkHttp interceptors HTTP requests and responses
allure-spring-web Spring RestTemplate interceptors HTTP requests and responses
allure-jax-rs Jakarta RESTful Web Services / JAX-RS client filters HTTP requests and responses
allure-servlet-api Jakarta Servlet request/response conversion Servlet request and response data
allure-grpc gRPC client interceptors gRPC calls and metadata
allure-selenide Selenide UI tests UI steps, screenshots, page source, logs
allure-selenium-bidi Selenium WebDriver BiDi sessions Browser logs and network attachments
allure-playwright Playwright Java actions AspectJ action steps and screenshots
allure-jooq jOOQ execution listener SQL execution steps

Assertions And Utilities

Module Use When Notes
allure-assertj AssertJ assertions should appear as Allure steps Requires AspectJ
allure-hamcrest Hamcrest assertions should appear as Allure steps Requires AspectJ
allure-jupiter-assert JUnit Jupiter assertions should appear as Allure steps Requires AspectJ
allure-awaitility Awaitility polling should appear as Allure steps Register condition listener
allure-jsonunit JsonUnit diffs should be attached to Allure Provides JSON matcher/listener helpers

Core And Support Modules

Module Purpose
allure-bom Maven/Gradle dependency alignment
allure-java-commons Runtime API, lifecycle, annotations, aspects, and test-plan filtering
allure-kotlin-coroutines Suspend steps and Allure context propagation for Kotlin coroutines
allure-kotlin-extensions Kotlin-first facade for the public Allure runtime API
allure-model Serializable Allure result model
allure-descriptions-javadoc Annotation processor for JavaDoc-based test descriptions

Common Runtime APIs

Most adapters depend on allure-java-commons, which provides the high-level API:

java
import io.qameta.allure.Allure;

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

For HTTP clients, browser tools, assertion libraries, and other integrations, add the matching module from the catalog above. Each module README shows the registration snippet for that tool.

Resources

  • Allure Report documentation

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javaallurecucumber-jvmjunit4junit5

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言