Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
45 lines (31 loc) · 1.59 KB

File metadata and controls

45 lines (31 loc) · 1.59 KB
Copy raw file
Download raw file
Outline
Edit and raw actions

allure-spock2

Spock 2 integration for Allure Java.

Use this module when your specifications run on Spock 2 and you want specifications, features, iterations, fixtures, parameters, and failures to appear in Allure Report.

Supported Versions

  • Allure Java 3.x requires Java 17 or newer.
  • This module targets Spock 2.4, whose block-listener API is used for block reporting.
  • The current build validates against Spock 2.4 for Groovy 5.0 and Groovy 5.0.7.

Installation

Gradle:

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

Maven, with allure-bom imported in dependency management:

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

Setup

Add the dependency to a Spock 2 project. The module registers io.qameta.allure.spock2.AllureSpock2 as a Spock global extension through service loader metadata.

Block reporting uses Spock runtime events and does not install a Groovy AST transformation, so the order of the Spock and Allure dependencies does not affect compilation.

Report Output

  • Specifications, features, iterations, fixture methods, and errors.
  • Executed given/setup, expect, when, then, and cleanup blocks, with iteration variables resolved in block descriptions. Spock does not emit execution events for where and filter blocks.
  • Data-driven parameters and Spock tags.
  • Labels, links, JavaDoc descriptions, test-plan filtering, and fixture metadata.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.