### Maven dependencyManagement and dependencies for allure-bom and allure-jupiter Source: https://github.com/allure-framework/allure-java/blob/main/README.md Imports the Allure BOM in Maven's dependencyManagement and adds the allure-jupiter test dependency. The version is specified via the ${allure.version} property. ```xml io.qameta.allure allure-bom ${allure.version} pom import io.qameta.allure allure-jupiter test ``` -------------------------------- ### Start tracing with TraceSession Source: https://github.com/allure-framework/allure-java/blob/main/allure-playwright/README.md Starts trace capture for a browser context and closes the returned session when the scenario ends. Use inside a try-with-resources block. ```java try (TraceSession trace = AllurePlaywright.startTracing(context)) { // run browser actions } ``` -------------------------------- ### Register AllureKarate as Karate runtime listener Source: https://github.com/allure-framework/allure-java/blob/main/allure-karate/README.md Configures the AllureKarate listener on a Karate Runner.builder to report features, scenarios, steps, and attachments. The example uses parallel(4) and a classpath path. ```java Runner.builder() .path("classpath:features") .listener(new AllureKarate()) .parallel(4); ``` -------------------------------- ### Gradle dependency setup for allure-jupiter Source: https://github.com/allure-framework/allure-java/blob/main/allure-jupiter/README.md Add the Allure BOM and allure-jupiter as test dependencies, and configure the test task to use JUnit Platform. Requires Java 17 or newer for Allure Java 3.x. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-jupiter") } tasks.test { useJUnitPlatform() } ``` -------------------------------- ### Step with parameter options (excluded and mode) Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Use `StepScope.parameter` with named arguments to set `excluded` and `mode` independently. This example masks the parameter value and excludes it from reporting. ```kotlin step("Authenticate") { parameter( name = "access token", value = token, excluded = true, mode = Parameter.Mode.MASKED, ) authenticate(token) } ``` -------------------------------- ### Karate logging mask configuration for HTTP redaction Source: https://github.com/allure-framework/allure-java/blob/main/allure-karate/README.md Example of a Karate configure logging block that masks the X-Api-Key header and the JSON path $.credentials.secret with '***'. This configuration is honored by Allure's HTTP exchange attachments. ```gherkin * configure logging = """ { mask: { headers: ['X-Api-Key'], jsonPaths: ['$.credentials.secret'], replacement: '***' } } """ ``` -------------------------------- ### Gradle dependency for allure-testng Source: https://github.com/allure-framework/allure-java/blob/main/allure-testng/README.md Add the Allure TestNG listener to your Gradle test dependencies using the Allure BOM for version management. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-testng") } ``` -------------------------------- ### Gradle: Declare Allure BOM with testImplementation platform Source: https://github.com/allure-framework/allure-java/blob/main/allure-bom/README.md Adds the Allure BOM as a platform dependency in Gradle, then declares Allure modules without versions. Requires Java 17 or newer for Allure Java 3.x runtime modules. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-jupiter") testImplementation("io.qameta.allure:allure-rest-assured") } ``` -------------------------------- ### Register AllureOkHttp3 interceptor Source: https://github.com/allure-framework/allure-java/blob/main/allure-okhttp3/README.md Registers the AllureOkHttp3 interceptor on an OkHttpClient. The example also configures redaction of the Authorization header. ```java OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(new AllureOkHttp3() .configureHttpExchange(exchange -> exchange.redactHeader("Authorization"))) .build(); ``` -------------------------------- ### Gradle dependency setup for allure-junit4 Source: https://github.com/allure-framework/allure-java/blob/main/allure-junit4/README.md Adds the allure-junit4 test dependency via the Allure BOM and configures the test task to use JUnit 4. Requires Java 17 or newer for Allure Java 3.x. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-junit4") } tasks.test { useJUnit() } ``` -------------------------------- ### Maven: Import Allure BOM in dependencyManagement Source: https://github.com/allure-framework/allure-java/blob/main/allure-bom/README.md Imports the Allure BOM POM in Maven's dependencyManagement with scope import. After importing, omit versions from individual Allure Java dependencies. ```xml io.qameta.allure allure-bom ${allure.version} pom import ``` -------------------------------- ### JsonPatchMatcher.jsonEquals usage Source: https://github.com/allure-framework/allure-java/blob/main/allure-jsonunit/README.md Use JsonPatchMatcher.jsonEquals(...) when comparing JSON payloads with JsonUnit to get readable JSON differences attached to Allure Report. ```java assertThat(actualJson, JsonPatchMatcher.jsonEquals(expectedJson)); ``` -------------------------------- ### Register AllureJaxRs as client filter Source: https://github.com/allure-framework/allure-java/blob/main/allure-jax-rs/README.md Register io.qameta.allure.jaxrs.AllureJaxRs as both a client request and response filter. The example configures redaction of the Authorization header via configureHttpExchange. ```java Client client = ClientBuilder.newClient() .register(new AllureJaxRs() .configureHttpExchange(exchange -> exchange.redactHeader("Authorization"))); ``` -------------------------------- ### Maven dependency for allure-testng Source: https://github.com/allure-framework/allure-java/blob/main/allure-testng/README.md Add the Allure TestNG listener to your Maven test dependencies, assuming allure-bom is imported in dependency management. ```xml io.qameta.allure allure-testng test ``` -------------------------------- ### Focused Allure Agent Run with Inline Expectations Source: https://github.com/allure-framework/allure-java/blob/main/docs/allure-agent-mode.md Use this command to run a narrow Gradle test scope with inline expectation options when exact expectations reduce real risk. It sets a goal, expects a test prefix and step substring, and runs the `:allure-awaitility:test` task without the Gradle daemon. Supported inline options include `--goal`, `--expect-prefix`, and `--expect-step-containing`; use `--expectations ` only for large or generated contracts. ```bash allure agent \ --goal "verify Awaitility listener step reporting" \ --expect-prefix "io.qameta.allure.awaitility." \ --expect-step-containing "Awaitility:" \ -- ./gradlew --no-daemon :allure-awaitility:test ``` -------------------------------- ### Full local tests profile Source: https://github.com/allure-framework/allure-java/blob/main/docs/allure-agent-mode.md Run the full local test suite with Allure agent, disabling the build cache and cleaning test results. Broad repo test validation. Can be expensive; local environment may differ from CI. ```bash allure agent --goal "full local test run" -- ./gradlew --no-build-cache cleanTest test ``` -------------------------------- ### Allure Agent CLI Query Helpers Source: https://github.com/allure-framework/allure-java/blob/main/docs/allure-agent-mode.md Use these commands to quickly review runtime artifacts after an agent-mode run. `allure agent latest` retrieves the latest output, and `allure agent query --latest` with subcommands like `summary`, `tests`, or `findings` provides focused views of the run's data. ```bash allure agent latest ``` ```bash allure agent query --latest summary ``` ```bash allure agent query --latest tests ``` ```bash allure agent query --latest findings ``` -------------------------------- ### Register AllureTestNg listener with @Listeners Source: https://github.com/allure-framework/allure-java/blob/main/allure-testng/README.md Register the AllureTestNg listener explicitly on a test class using TestNG's @Listeners annotation. ```java import io.qameta.allure.testng.AllureTestNg; import org.testng.annotations.Listeners; @Listeners(AllureTestNg.class) class MyTest { } ``` -------------------------------- ### Module with fresh execution profile Source: https://github.com/allure-framework/allure-java/blob/main/docs/allure-agent-mode.md Run a module's tests with Allure agent, forcing a fresh execution via --rerun-tasks. Use when Gradle up-to-date state could hide runtime evidence. Still limited to the module. ```bash allure agent --goal "" -- ./gradlew --no-daemon --rerun-tasks ::test ``` -------------------------------- ### Import the runtime facade Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Imports the complete facade and key model types for using the Kotlin extensions. ```kotlin import io.qameta.allure.kotlin.extensions.* import io.qameta.allure.model.Parameter import io.qameta.allure.model.Status import io.qameta.allure.model.StatusDetails ``` -------------------------------- ### Stages and steps with status Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Use `stage` and `step` functions to record already-completed steps and semantic stages. The `step` function can accept a `Status` argument to mark the step as skipped or other statuses. ```kotlin stage("prepare data") step("customer created") stage("verify result") step("optional check", Status.SKIPPED) ``` -------------------------------- ### Create a step with parameters using StepScope.parameter Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Use the top-level `step` function from `io.qameta.allure.kotlin.extensions.step` to create a step with a name and a body. Inside the body, `StepScope.parameter` adds a parameter with name and value, and `name` can rename the step dynamically. The body returns a value that becomes the step's result. ```kotlin import io.qameta.allure.kotlin.extensions.step val orderId = step("Create order") { parameter(name = "region", value = "eu-west") val id = createOrder() name("Create order $id") id } ``` -------------------------------- ### step (completed) Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Records an already-completed step with an optional status. ```APIDOC ## step (completed) ### Description Records an already-completed step with an optional status. ### Usage ```kotlin step("customer created") step("optional check", Status.SKIPPED) ``` ### Parameters - `name` (String) - Required - The step name. - `status` (Status) - Optional - The step status (e.g., Status.SKIPPED). ``` -------------------------------- ### Module profile Source: https://github.com/allure-framework/allure-java/blob/main/docs/allure-agent-mode.md Run all tests in a Gradle module with Allure agent, disabling the report. Use to validate one module after localized changes. Does not cover cross-module impact. ```bash allure agent --goal "" --report off -- ./gradlew --no-daemon ::test ``` -------------------------------- ### suite Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Adds a suite label to the test. ```APIDOC ## suite ### Description Adds a suite label to the test. ### Usage ```kotlin suite("Web checkout") ``` ### Parameters - `name` (String) - Required - The suite name. ``` -------------------------------- ### Gradle dependency for allure-descriptions-javadoc Source: https://github.com/allure-framework/allure-java/blob/main/allure-descriptions-javadoc/README.md Add the annotation processor as a test annotation processor in Gradle. Replace with the desired Allure version. ```kotlin dependencies { testAnnotationProcessor("io.qameta.allure:allure-descriptions-javadoc:") } ``` -------------------------------- ### descriptionHtml Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Sets the test description in HTML format. ```APIDOC ## descriptionHtml ### Description Sets the test description in HTML format. ### Usage ```kotlin descriptionHtml("

HTML description

") ``` ### Parameters - `html` (String) - Required - The HTML description. ``` -------------------------------- ### description Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Sets the test description in Markdown format. ```APIDOC ## description ### Description Sets the test description in Markdown format. ### Usage ```kotlin description("**Markdown** description") ``` ### Parameters - `text` (String) - Required - The Markdown description. ``` -------------------------------- ### step Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Creates a step with a lambda body. Supports named parameters for step metadata and can be used with or without a name. ```APIDOC ## step ### Description Creates a step with a lambda body. Supports named parameters for step metadata and can be used with or without a name. ### Usage ```kotlin import io.qameta.allure.kotlin.extensions.step val orderId = step("Create order") { parameter(name = "region", value = "eu-west") val id = createOrder() name("Create order $id") id } ``` ### Parameters - `name` (String) - Optional - Step name. If omitted, the step is recorded as `step`. - `body` (lambda) - Required - The step body. Can return a value or Unit. ### StepScope Methods - `parameter(name: String, value: Any?, excluded: Boolean = false, mode: Parameter.Mode? = null)` - Adds a parameter to the step. - `name(String)` - Sets the step name. ``` -------------------------------- ### Propagating Allure context with withAllureContext Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-coroutines/README.md Captures the current test, fixture, or step before launching structured coroutine work. Child coroutines get isolated stacks; context restores each worker thread after suspension. Pass a non-global lifecycle as withAllureContext(lifecycle). ```kotlin import io.qameta.allure.kotlin.coroutines.withAllureContext import io.qameta.allure.kotlin.extensions.attachment withAllureContext { coroutineScope { launch(Dispatchers.IO) { attachment(name = "worker output", content = loadOutput()) } launch(Dispatchers.Default) { step("calculate summary") { calculateSummary() } } } } ``` -------------------------------- ### Inspect CI dump profile Source: https://github.com/allure-framework/allure-java/blob/main/docs/allure-agent-mode.md Inspect CI-produced Allure results dumps downloaded from the build workflow. Reflects the CI matrix/exclusions, not local state. ```bash allure agent inspect --dump "allure-results-*.zip" --report off ``` -------------------------------- ### attachment Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Attaches content to the current test step or test. Supports String, ByteArray, and InputStream content types, with optional type and fileExtension parameters. ```APIDOC ## attachment ### Description Attaches content to the current test step or test. Supports String, ByteArray, and InputStream content types, with optional type and fileExtension parameters. ### Method Function call ### Signature `attachment(name: String, content: Any, type: String? = null, fileExtension: String? = null)` ### Parameters - **name** (String) - Required - The name of the attachment. - **content** (String | ByteArray | InputStream) - Required - The content to attach. - **type** (String) - Optional - The MIME type of the content. If null, Allure detects it from the content. - **fileExtension** (String) - Optional - The file extension for the attachment. If null, Allure detects it from the media type; empty string suppresses the extension. ### Example ```kotlin attachment(name = "response", content = responseBody) attachment( name = "screenshot", content = screenshotBytes, type = "image/png", fileExtension = "png", ) ``` ``` -------------------------------- ### story Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Adds a story label to the test. ```APIDOC ## story ### Description Adds a story label to the test. ### Usage ```kotlin story("Saved card") ``` ### Parameters - `name` (String) - Required - The story name. ``` -------------------------------- ### Maven compiler plugin configuration for allure-descriptions-javadoc Source: https://github.com/allure-framework/allure-java/blob/main/allure-descriptions-javadoc/README.md Configure the Maven compiler plugin to include the annotation processor in annotationProcessorPaths. Replace ${allure.version} with the desired Allure version. ```xml org.apache.maven.plugins maven-compiler-plugin io.qameta.allure allure-descriptions-javadoc ${allure.version} ``` -------------------------------- ### epic Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Adds an epic label to the test. ```APIDOC ## epic ### Description Adds an epic label to the test. ### Usage ```kotlin epic("Checkout") ``` ### Parameters - `name` (String) - Required - The epic name. ``` -------------------------------- ### addHttpExchange Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Attaches a captured HTTP exchange to the current test step or test. ```APIDOC ## addHttpExchange ### Description Attaches a captured HTTP exchange to the current test step or test. ### Method Function call ### Signature `addHttpExchange(name: String, exchange: HttpExchange)` ### Parameters - **name** (String) - Required - The name of the HTTP exchange attachment. - **exchange** (HttpExchange) - Required - The captured HTTP exchange to attach. ### Example ```kotlin addHttpExchange(name = "HTTP exchange", exchange = capturedExchange) ``` ``` -------------------------------- ### Attach content with attachment() Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Attaches content to the current test step. Supports String, ByteArray, and InputStream content types. The type and fileExtension arguments are optional; a null fileExtension lets Allure detect it from the media type, and an empty string suppresses the extension. ```kotlin import io.qameta.allure.kotlin.extensions.attachment attachment(name = "response", content = responseBody) attachment( name = "screenshot", content = screenshotBytes, type = "image/png", fileExtension = "png", ) ``` -------------------------------- ### Gradle dependency for allure-selenium-bidi Source: https://github.com/allure-framework/allure-java/blob/main/allure-selenium-bidi/README.md Add the allure-selenium-bidi module as a test dependency using the Allure BOM for version management. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-selenium-bidi") } ``` -------------------------------- ### Inspect existing results profile Source: https://github.com/allure-framework/allure-java/blob/main/docs/allure-agent-mode.md Inspect failures from an existing Allure results directory, disabling the report. Clean the directory first for a scoped signal. Only reflects what was already produced. ```bash allure agent inspect /build/allure-results --report off ``` -------------------------------- ### Focused test profile Source: https://github.com/allure-framework/allure-java/blob/main/docs/allure-agent-mode.md Run a single Gradle test class or method with Allure agent, disabling the report. Use to validate one class, method, or narrowly scoped behavior. Only proves the selected Gradle test scope. ```bash allure agent --goal "" --report off -- ./gradlew --no-daemon ::test --tests ``` -------------------------------- ### Create Allure event source factory Source: https://github.com/allure-framework/allure-java/blob/main/allure-okhttp3/README.md Creates a reusable EventSource.Factory that captures Allure context when newEventSource is called. Use this for server-sent events to keep attachments with the owning test or fixture. ```java EventSource.Factory eventSourceFactory = AllureEventSources.createFactory(client); EventSource eventSource = eventSourceFactory.newEventSource(request, listener); ``` -------------------------------- ### Java test method with JavaDoc comment for Allure description Source: https://github.com/allure-framework/allure-java/blob/main/allure-descriptions-javadoc/README.md Add the processor to test compilation. Supported adapters use the JavaDoc comment as the Allure description when no explicit @Description is present. ```java /** * Verifies that paid orders can be refunded. */ @Test void refundsPaidOrder() { } ``` -------------------------------- ### stage Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Records a semantic stage (a completed step) with the given name. ```APIDOC ## stage ### Description Records a semantic stage (a completed step) with the given name. ### Usage ```kotlin stage("prepare data") ``` ### Parameters - `name` (String) - Required - The stage name. ``` -------------------------------- ### label Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Adds a custom label to the test. ```APIDOC ## label ### Description Adds a custom label to the test. ### Usage ```kotlin label(name = "component", value = "billing") ``` ### Parameters - `name` (String) - Required - The label name. - `value` (String) - Required - The label value. ``` -------------------------------- ### link Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Adds a link to the test. Supports optional name and type. ```APIDOC ## link ### Description Adds a link to the test. Supports optional name and type. ### Usage ```kotlin link(url = "https://example.test") link(name = "Documentation", url = "https://example.test/docs") link(name = "Dashboard", type = "dashboard", url = "https://example.test/dashboard") ``` ### Parameters - `name` (String) - Optional - The link name. - `type` (String) - Optional - The link type (e.g., "dashboard"). - `url` (String) - Required - The link URL. ``` -------------------------------- ### feature Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Adds a feature label to the test. ```APIDOC ## feature ### Description Adds a feature label to the test. ### Usage ```kotlin feature("Payment") ``` ### Parameters - `name` (String) - Required - The feature name. ``` -------------------------------- ### Runtime metadata operations with named arguments Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md All runtime metadata operations support Kotlin named arguments. This includes labels, parameters, links, issues, TMS links, and descriptions. The `parameter` call here uses `excluded` and `mode` options. ```kotlin epic("Checkout") feature("Payment") story("Saved card") suite("Web checkout") label(name = "component", value = "billing") parameter( name = "access token", value = token, excluded = true, mode = Parameter.Mode.MASKED, ) link(url = "https://example.test") link(name = "Documentation", url = "https://example.test/docs") link(name = "Dashboard", type = "dashboard", url = "https://example.test/dashboard") issue(name = "BUG-42", url = "https://example.test/issues/42") tms(name = "CASE-7", url = "https://example.test/cases/7") description("**Markdown** description") descriptionHtml("

HTML description

") ``` -------------------------------- ### parameter Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Adds a parameter to the test or step. Supports named arguments for exclusion and masking. ```APIDOC ## parameter ### Description Adds a parameter to the test or step. Supports named arguments for exclusion and masking. ### Usage ```kotlin parameter( name = "access token", value = token, excluded = true, mode = Parameter.Mode.MASKED, ) ``` ### Parameters - `name` (String) - Required - The parameter name. - `value` (Any?) - Required - The parameter value. - `excluded` (Boolean) - Optional - Whether the parameter is excluded from reports. - `mode` (Parameter.Mode) - Optional - The parameter mode (e.g., MASKED). ``` -------------------------------- ### issue Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Adds an issue link to the test. ```APIDOC ## issue ### Description Adds an issue link to the test. ### Usage ```kotlin issue(name = "BUG-42", url = "https://example.test/issues/42") ``` ### Parameters - `name` (String) - Required - The issue name. - `url` (String) - Required - The issue URL. ``` -------------------------------- ### HttpExchange builder with redaction and truncation Source: https://github.com/allure-framework/allure-java/blob/main/allure-java-commons/README.md Builds an HTTP exchange with redaction for headers, cookies, query parameters, and form parameters, plus a max body size. The builder applies redaction and truncation before attaching; common credential headers are redacted by default. ```java 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); ``` -------------------------------- ### Direct context composition with allureContext() Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-coroutines/README.md Use allureContext() or lifecycle.asCoroutineContext() for direct context composition when launching coroutines. ```kotlin launch(Dispatchers.IO + allureContext()) { // ... } ``` -------------------------------- ### Register AllureJooq as jOOQ ExecuteListener Source: https://github.com/allure-framework/allure-java/blob/main/allure-jooq/README.md Configures a jOOQ Configuration with AllureJooq as an ExecuteListener to render SQL and execution status as Allure steps. ```java Configuration configuration = new DefaultConfiguration() .set(new DefaultExecuteListenerProvider(new AllureJooq())); ``` -------------------------------- ### Decorate WebDriver with AllureWebDriverBiDi Source: https://github.com/allure-framework/allure-java/blob/main/allure-selenium-bidi/README.md Configure and decorate a Selenium WebDriver to collect browser logs and network events via WebDriver BiDi. Enable logs and network, set limits, and redact headers. Close the listener manually at the end of the test or fixture. ```java AllureWebDriverBiDi bidi = new AllureWebDriverBiDi() .logs(true) .network(true) .maxLogEntries(500) .maxNetworkEvents(500) .redactHeaders("Authorization", "Cookie"); WebDriver driver = bidi.decorate(new ChromeDriver()); ``` -------------------------------- ### Gradle dependency for allure-karate Source: https://github.com/allure-framework/allure-java/blob/main/allure-karate/README.md Adds the allure-karate module to a Gradle test implementation using the Allure BOM for version management. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-karate") } ``` -------------------------------- ### Enable browser log capture with enableLogs Source: https://github.com/allure-framework/allure-java/blob/main/allure-selenide/README.md Enable browser log capture for a specific Selenium log type, such as BROWSER, with a severity level. ```java new AllureSelenide() .enableLogs(LogType.BROWSER, Level.SEVERE); ``` -------------------------------- ### Gradle dependency for allure-junit-platform Source: https://github.com/allure-framework/allure-java/blob/main/allure-junit-platform/README.md Adds the Allure JUnit Platform adapter via the Allure BOM in a Gradle build. Requires Java 17 or newer for Allure Java 3.x. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-junit-platform") } ``` -------------------------------- ### Maven dependency for allure-junit-platform Source: https://github.com/allure-framework/allure-java/blob/main/allure-junit-platform/README.md Adds the Allure JUnit Platform adapter as a test-scoped dependency, assuming allure-bom is imported in dependency management. ```xml io.qameta.allure allure-junit-platform test ``` -------------------------------- ### Allure.step and Allure.attachment usage Source: https://github.com/allure-framework/allure-java/blob/main/allure-java-commons/README.md Uses the high-level Allure runtime API to create a step and attach a request ID. Attachments created this way become attachment steps, keeping them ordered with surrounding steps in Allure Report. ```java import io.qameta.allure.Allure; Allure.step("Create order", () -> { Allure.attachment("request-id", "42"); }); ``` -------------------------------- ### Gradle dependency for allure-grpc Source: https://github.com/allure-framework/allure-java/blob/main/allure-grpc/README.md Adds the allure-grpc module as a test dependency using the Allure BOM for version management. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-grpc") } ``` -------------------------------- ### Gradle dependency for allure-servlet-api Source: https://github.com/allure-framework/allure-java/blob/main/allure-servlet-api/README.md Adds the allure-servlet-api dependency using the Allure BOM for version management. Requires Java 17 or newer for Allure Java 3.x. ```kotlin dependencies { implementation(platform("io.qameta.allure:allure-bom:")) implementation("io.qameta.allure:allure-servlet-api") } ``` -------------------------------- ### Gradle dependency for allure-jooq Source: https://github.com/allure-framework/allure-java/blob/main/allure-jooq/README.md Adds the allure-jooq module as a test dependency using the Allure BOM to manage the version. Requires Java 21 or newer and targets jOOQ 3.21.x. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-jooq") } ``` -------------------------------- ### Maven dependency for allure-selenium-bidi Source: https://github.com/allure-framework/allure-java/blob/main/allure-selenium-bidi/README.md Add the allure-selenium-bidi module as a test dependency in Maven, assuming allure-bom is imported in dependency management. ```xml io.qameta.allure allure-selenium-bidi test ``` -------------------------------- ### Gradle dependency for allure-spring-web Source: https://github.com/allure-framework/allure-java/blob/main/allure-spring-web/README.md Adds the allure-spring-web test dependency using the Allure BOM to manage the version. Replace with the desired Allure Java version. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-spring-web") } ``` -------------------------------- ### Register page and attach screenshot Source: https://github.com/allure-framework/allure-java/blob/main/allure-playwright/README.md Registers a Playwright page for automatic failure diagnostics and attaches a screenshot. Requires AspectJ weaving enabled. ```java AllurePlaywright.register(page); AllurePlaywright.attachScreenshot("Checkout page", page); ``` -------------------------------- ### Configure redaction and body limits Source: https://github.com/allure-framework/allure-java/blob/main/allure-java-httpclient/README.md Customize the HTTP exchange attachment by redacting headers and query parameters and setting a maximum body size before sharing the client. ```java HttpClient httpClient = AllureHttpClient.wrap(HttpClient.newHttpClient()) .configureHttpExchange(exchange -> exchange .redactHeader("X-Api-Key") .redactQueryParameter("token") .setMaxBodySize(64 * 1024)); ``` -------------------------------- ### Configure exchange options with configureExchange Source: https://github.com/allure-framework/allure-java/blob/main/allure-grpc/README.md Builds an AllureGrpc interceptor that sets a maximum body size of 256,000 bytes for the underlying HTTP exchange. ```java ClientInterceptor allure = AllureGrpc.builder() .configureExchange(exchange -> exchange.setMaxBodySize(256_000)) .build(); ``` -------------------------------- ### Register AllureAwaitilityListener as condition listener Source: https://github.com/allure-framework/allure-java/blob/main/allure-awaitility/README.md Registers io.qameta.allure.awaitility.AllureAwaitilityListener on an Awaitility await() call to report polling attempts, timeouts, ignored exceptions, and successful waits in Allure Report. ```java await() .conditionEvaluationListener(new AllureAwaitilityListener()) .untilAsserted(() -> assertThat(service.isReady()).isTrue()); ``` -------------------------------- ### Gradle dependency for allure-java-commons Source: https://github.com/allure-framework/allure-java/blob/main/allure-java-commons/README.md Adds the allure-java-commons module via the Allure BOM in a Gradle build. Use testImplementation with the BOM platform to manage the version. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-java-commons") } ``` -------------------------------- ### Step with Unit-returning body and default name Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md The `step` function accepts a body that returns `Unit`. When the name is omitted, the step is recorded as `step`. ```kotlin step { verifyOrder(orderId) } ``` -------------------------------- ### Gradle dependency for allure-awaitility Source: https://github.com/allure-framework/allure-java/blob/main/allure-awaitility/README.md Adds the allure-awaitility module to a Gradle test implementation configuration, using the Allure BOM to manage the version. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-awaitility") } ``` -------------------------------- ### Gradle configuration for allure-assertj with AspectJ agent Source: https://github.com/allure-framework/allure-java/blob/main/allure-assertj/README.md Adds the allure-assertj dependency and configures the AspectJ javaagent for the test JVM. Requires Java 17 or newer for Allure Java 3.x. The aspectjAgent configuration is used to pass the weaver as a JVM argument. ```kotlin val aspectjAgent by configurations.creating dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-assertj") testRuntimeOnly("org.aspectj:aspectjrt:") aspectjAgent("org.aspectj:aspectjweaver:") } tasks.test { doFirst { jvmArgs("-javaagent:${aspectjAgent.singleFile}") } } ``` -------------------------------- ### Access and replace the process-wide lifecycle Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Provides access to the process-wide lifecycle property and allows replacing it. Replacing the lifecycle affects the whole process and should be isolated from concurrent test execution. ```kotlin val currentLifecycle = lifecycle lifecycle = customLifecycle ``` -------------------------------- ### sbt test option to register AllureScalatest reporter Source: https://github.com/allure-framework/allure-java/blob/main/allure-scalatest/README.md Register io.qameta.allure.scalatest.AllureScalatest as a ScalaTest reporter via sbt test options. ```scala Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-C", "io.qameta.allure.scalatest.AllureScalatest") ``` -------------------------------- ### Gradle dependency for allure-httpclient Source: https://github.com/allure-framework/allure-java/blob/main/allure-httpclient/README.md Adds the allure-httpclient module as a test dependency using the Allure BOM for version management. Requires Java 17 or newer for Allure Java 3.x. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-httpclient") } ``` -------------------------------- ### Configure header and cookie redaction with AllureGrpc.builder() Source: https://github.com/allure-framework/allure-java/blob/main/allure-grpc/README.md Builds an AllureGrpc interceptor that redacts the specified header and cookie from captured metadata. ```java ClientInterceptor allure = AllureGrpc.builder() .redactHeader("x-api-key") .redactCookie("session") .build(); ``` -------------------------------- ### attachmentAsync Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Asynchronously attaches content to the current test step or test. The returned future completes after the content is written, and the owning executable waits for registered asynchronous attachments before it ends. ```APIDOC ## attachmentAsync ### Description Asynchronously attaches content to the current test step or test. The returned future completes after the content is written, and the owning executable waits for registered asynchronous attachments before it ends. ### Method Function call ### Signature `attachmentAsync(name: String, content: Future, type: String? = null, fileExtension: String? = null)` ### Parameters - **name** (String) - Required - The name of the attachment. - **content** (Future) - Required - A future that resolves to the content to attach. - **type** (String) - Optional - The MIME type of the content. - **fileExtension** (String) - Optional - The file extension for the attachment. ### Example ```kotlin attachmentAsync( name = "worker output", content = outputFuture, type = "text/plain", fileExtension = "log", ) ``` ``` -------------------------------- ### Register AllureSelenide listener with SelenideLogger Source: https://github.com/allure-framework/allure-java/blob/main/allure-selenide/README.md Register the AllureSelenide listener with SelenideLogger, typically in a test fixture before browser actions, enabling screenshots and page source capture. ```java SelenideLogger.addListener( "AllureSelenide", new AllureSelenide() .screenshots(true) .savePageSource(true) ); ``` -------------------------------- ### Maven dependency for allure-karate Source: https://github.com/allure-framework/allure-java/blob/main/allure-karate/README.md Adds the allure-karate module as a test dependency in Maven, assuming allure-bom is imported in dependency management. ```xml io.qameta.allure allure-karate test ``` -------------------------------- ### Gradle dependency for allure-okhttp3 Source: https://github.com/allure-framework/allure-java/blob/main/allure-okhttp3/README.md Adds the allure-okhttp3 module as a test dependency using the Allure BOM. Requires Java 17 or newer for Allure Java 3.x. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-okhttp3") } ``` -------------------------------- ### Maven dependency for allure-servlet-api Source: https://github.com/allure-framework/allure-java/blob/main/allure-servlet-api/README.md Declares the allure-servlet-api dependency in Maven, with allure-bom imported in dependency management. ```xml io.qameta.allure allure-servlet-api ``` -------------------------------- ### Gradle configuration for allure-junit4-aspect Source: https://github.com/allure-framework/allure-java/blob/main/allure-junit4-aspect/README.md Adds the AspectJ agent and dependencies for JUnit 4 tests with Gradle's built-in runner. Requires Java 17 or newer and JUnit 4.13.2 with AspectJ 1.9.25.1. ```kotlin val aspectjAgent by configurations.creating dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-junit4-aspect") testRuntimeOnly("org.aspectj:aspectjrt:") aspectjAgent("org.aspectj:aspectjweaver:") } tasks.test { useJUnit() doFirst { jvmArgs("-javaagent:${aspectjAgent.singleFile}") } } ``` -------------------------------- ### Gradle dependency for allure-httpclient5 Source: https://github.com/allure-framework/allure-java/blob/main/allure-httpclient5/README.md Adds the allure-httpclient5 module as a test dependency using the Allure BOM to manage the version. Requires Java 17 or newer for Allure Java 3.x. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-httpclient5") } ``` -------------------------------- ### Gradle dependency for allure-cucumber7-jvm Source: https://github.com/allure-framework/allure-java/blob/main/allure-cucumber7-jvm/README.md Add the Allure BOM and the allure-cucumber7-jvm test dependency to your Gradle build. Replace with the desired Allure Java version. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-cucumber7-jvm") } ``` -------------------------------- ### Maven dependency for allure-awaitility Source: https://github.com/allure-framework/allure-java/blob/main/allure-awaitility/README.md Adds the allure-awaitility module as a test-scoped Maven dependency, relying on the imported allure-bom for version management. ```xml io.qameta.allure allure-awaitility test ``` -------------------------------- ### Gradle dependency for allure-jax-rs Source: https://github.com/allure-framework/allure-java/blob/main/allure-jax-rs/README.md Add the Allure BOM and allure-jax-rs test dependency in a Gradle build. Requires Java 17 or newer for Allure Java 3.x. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-jax-rs") } ``` -------------------------------- ### Maven dependency for allure-httpclient5 Source: https://github.com/allure-framework/allure-java/blob/main/allure-httpclient5/README.md Declares the allure-httpclient5 module as a test-scoped dependency. Requires allure-bom imported in dependency management to control the version. ```xml io.qameta.allure allure-httpclient5 test ``` -------------------------------- ### Gradle dependency and AspectJ agent configuration Source: https://github.com/allure-framework/allure-java/blob/main/allure-hamcrest/README.md Adds the allure-hamcrest module via the Allure BOM and configures the AspectJ weaver as a javaagent for the test JVM. Required for Hamcrest assertions to appear as Allure steps. ```kotlin val aspectjAgent by configurations.creating dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-hamcrest") testRuntimeOnly("org.aspectj:aspectjrt:") aspectjAgent("org.aspectj:aspectjweaver:") } tasks.test { doFirst { jvmArgs("-javaagent:${aspectjAgent.singleFile}") } } ``` -------------------------------- ### lifecycle property Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Provides access to the process-wide Allure lifecycle. Replacing the lifecycle affects the whole process and should be isolated from concurrent test execution. ```APIDOC ## lifecycle property ### Description Provides access to the process-wide Allure lifecycle. Replacing the lifecycle affects the whole process and should be isolated from concurrent test execution. ### Method Property access ### Signature `var lifecycle: Lifecycle` ### Usage ```kotlin val currentLifecycle = lifecycle lifecycle = customLifecycle ``` ``` -------------------------------- ### tms Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Adds a TMS (Test Management System) link to the test. ```APIDOC ## tms ### Description Adds a TMS (Test Management System) link to the test. ### Usage ```kotlin tms(name = "CASE-7", url = "https://example.test/cases/7") ``` ### Parameters - `name` (String) - Required - The TMS case name. - `url` (String) - Required - The TMS case URL. ``` -------------------------------- ### Gradle dependency for allure-scalatest Source: https://github.com/allure-framework/allure-java/blob/main/allure-scalatest/README.md Add the Allure BOM and the allure-scalatest_3 artifact for Scala 3. Use the _2.12 or _2.13 artifact for Scala 2. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-scalatest_3") } ``` -------------------------------- ### Run JPMS consumer compatibility tests with Allure agent Source: https://github.com/allure-framework/allure-java/blob/main/allure-jpms-tests/README.md Executes the JPMS end-to-end test suite from the repository root, expecting test names prefixed with io.qameta.allure.jpms. Set JAVA_HOME to test another JDK; the suite also runs under the normal Gradle test task in the Java 17 and 25 CI matrix. ```shell allure agent --goal 'Verify JPMS consumer compatibility' \ --expect-prefix io.qameta.allure.jpms. \ -- ./gradlew --no-daemon :allure-jpms-tests:cleanTest :allure-jpms-tests:test ``` -------------------------------- ### Gradle dependency for allure-jsonunit Source: https://github.com/allure-framework/allure-java/blob/main/allure-jsonunit/README.md Adds the allure-jsonunit module as a test dependency using the Allure BOM for version management. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-jsonunit") } ``` -------------------------------- ### Gradle dependency for allure-model Source: https://github.com/allure-framework/allure-java/blob/main/allure-model/README.md Adds the allure-model dependency using the Allure BOM for version management. Requires Java 17 or newer for Allure Java 3.x. ```kotlin dependencies { implementation(platform("io.qameta.allure:allure-bom:")) implementation("io.qameta.allure:allure-model") } ``` -------------------------------- ### Gradle dependency for allure-kotlin-extensions Source: https://github.com/allure-framework/allure-java/blob/main/allure-kotlin-extensions/README.md Adds the Kotlin extensions module via the Allure BOM. Requires Java 17+ and Kotlin 2.0+. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-kotlin-extensions") testImplementation("io.qameta.allure:allure-jupiter") // or another test-framework adapter } ``` -------------------------------- ### Gradle dependency for allure-java-httpclient Source: https://github.com/allure-framework/allure-java/blob/main/allure-java-httpclient/README.md Add the Allure BOM and the HTTP client module as test dependencies in a Gradle build. Requires Java 17 or newer for Allure Java 3.x. ```kotlin dependencies { testImplementation(platform("io.qameta.allure:allure-bom:")) testImplementation("io.qameta.allure:allure-java-httpclient") } ``` -------------------------------- ### Maven dependency for allure-httpclient Source: https://github.com/allure-framework/allure-java/blob/main/allure-httpclient/README.md Adds the allure-httpclient module as a test dependency, assuming allure-bom is imported in dependency management. ```xml io.qameta.allure allure-httpclient test ``` -------------------------------- ### Maven dependency for allure-grpc Source: https://github.com/allure-framework/allure-java/blob/main/allure-grpc/README.md Adds the allure-grpc module as a test dependency, assuming allure-bom is imported in dependency management. ```xml io.qameta.allure allure-grpc test ```