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-junit4-aspect at main · AndreUTF/allure-java

Expand file tree

/

allure-junit4-aspect

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

allure-junit4-aspect

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

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

README.md

Outline

allure-junit4-aspect

AspectJ based JUnit 4 integration for Gradle test execution.

Use this module for Gradle projects that run JUnit 4 tests with Gradle's built-in runner and cannot register a JUnit 4 RunListener directly.

Supported Versions

  • Allure Java 3.x requires Java 17 or newer.
  • This module targets JUnit 4 and delegates reporting to allure-junit4.
  • The current build validates against JUnit 4.13.2 and AspectJ 1.9.25.1.

Installation

Gradle:

val aspectjAgent by configurations.creating

dependencies {
    testImplementation(platform("io.qameta.allure:allure-bom:<allure-version>"))
    testImplementation("io.qameta.allure:allure-junit4-aspect")
    testRuntimeOnly("org.aspectj:aspectjrt:<aspectj-version>")
    aspectjAgent("org.aspectj:aspectjweaver:<aspectj-version>")
}

tasks.test {
    useJUnit()
    doFirst {
        jvmArgs("-javaagent:${aspectjAgent.singleFile}")
    }
}

Maven users normally use allure-junit4 with a listener-capable test runner. Use this AspectJ artifact only when you specifically need weaving-based listener registration.

Setup

Enable the AspectJ weaver for the test JVM. The aspects add the Allure JUnit 4 listener to RunNotifier and apply the Allure JUnit 4 test-plan filter during JUnit 4 execution.

If your runner already lets you register AllureJunit4 directly, prefer allure-junit4.

Report Output

  • The same JUnit 4 tests, assumptions, ignored tests, labels, links, and failures reported by allure-junit4.
  • Automatic listener registration for Gradle's built-in JUnit 4 test task.
  • Test-plan filtering without manual JUnit 4 runner wiring.

For large test classpaths, consider an AspectJ META-INF/aop.xml that limits weaving to Allure, JUnit, and your test packages.

You are visitor 01402520 — 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.