Skip to content

Releases: naveenautomationlabs/reporting-labs-java

v0.1.9 — New Features Added for Selenium Java with Bug Fixes

Choose a tag to compare

@naveenanimation20 naveenanimation20 released this 27 Sep 06:49

Added

  • Selenium add-on reporting-labs-selenium: RlSelenium.attach(driver) records every navigation, click, keystroke (masked for password-like fields), clear, submit, alert and frame switch as a timed step; the failing action is highlighted; screenshot per reporting-labs.screenshot with no teardown code. Works with a driver created once per class/test and reused.
  • Rl.step(title, body) — nested, timed steps (Playwright test.step equivalent); value-returning overload.
  • Before/After hooks (@BeforeSuite/@BeforeTest/@BeforeClass/@BeforeMethod, @BeforeEach, and the After variants) shown as hook steps with timings.
  • Console output: System.out / System.err printed during a test is captured per test (reporting-labs.captureStdout, default true).
  • TestNG IRetryAnalyzer retries grouped as attempts of one test; a pass after a failure is marked Flaky.

Fixed

  • Option-style properties tolerate a trailing # comment.
  • Tests are emitted in run order; skip reasons trimmed to one line.

v0.1.8 — New Features Added - support for Rest Assured and Playwright Java

Choose a tag to compare

@naveenanimation20 naveenanimation20 released this 27 Sep 04:33

Added

  • RlPlaywright.record(APIRequestContext) — wrap page.request() or playwright.request().newContext() and every get/post/put/patch/delete/head/fetch call lands in the report with method, URL (query params included), request headers and body (setData as JSON, setForm / setMultipart as fields), status, timing, response headers and body (text types, 200 KB cap). Connection errors are recorded as failed calls and rethrown.
  • Page-level capture now records the response body of XHR/fetch requests.

v0.1.7 — Bug fixes

Choose a tag to compare

@naveenanimation20 naveenanimation20 released this 27 Sep 04:01

Fixed

  • Blank report with 2+ failures. The template ranks failures by dimensionOrder.priority / .severity; Java only emitted user-configured entries, so the default report shipped an empty map and the ranking crashed. Defaults (P0…P4, blocker…trivial) are now always present.
  • Rl.shouldCaptureScreenshot() / shouldCaptureTrace() / shouldCaptureVideo() return false for a skipped test, matching the Playwright add-on — no screenshot for skips under always / only-on-pass.
  • Trend chart: a priority series that starts with empty runs no longer produces an invalid SVG path.
  • accent / customCss are applied even when the bundled template lacks their placeholders (injected as a <style> block) — the report is always written.

Added

  • ReportBuilderTest pins every option field the template reads and the failed-test error shape.

Verified on

Selenium 4.49 + Chrome 141 · Playwright for Java 1.63 · TestNG 7.10 · JUnit Jupiter 5.10 — all capture policies and aliases, -D / env overrides, parallel="methods" × 3, popups via attach(context), data-driven rows, skip reasons, REST Assured filter. Five generated reports rendered in Chromium with zero console errors.

v0.1.6 — New Features Added

Choose a tag to compare

@naveenanimation20 naveenanimation20 released this 27 Sep 03:42

Playwright for Java users: please upgrade. Auto-capture did not work in 0.1.5 — see the first item.

Fixed

  • Playwright auto-capture was silently doing nothing. RlPlaywright.attach(page) is normally called from @BeforeMethod / @BeforeEach, but both TestNG and JUnit run those hooks before the "test started" callback the bindings used, so there was no current test to attach to — no API rows, no trace, no failure screenshot. The test slot now opens before setup hooks run (TestNG IConfigurationListener.beforeConfiguration, JUnit BeforeEachCallback).
  • Rl.attach() / Rl.log() called from @AfterMethod / @AfterEach now land on the test that just finished. Previously the slot was already cleared, so Selenium teardown screenshots were dropped.
  • Multi-tab flows: with RlPlaywright.attach(BrowserContext) the trace for a test that opened a popup was never attached. Every page of a test is now tracked; the trace is attached once and the failure screenshot comes from the most recent page still open.
  • A skipped test no longer receives a screenshot or trace under any policy (always and only-on-pass included).
  • JUnit 5 assumption failures (Assumptions.assumeTrue) are reported as skipped, not failed.
  • reporting-labs.properties is read as UTF-8; non-ASCII titles rendered as mojibake before.
  • Header masking ignores - and _, so X-Api-Key, x_auth_token etc. are masked like apiKey / authToken.

Added

  • Rl.shouldCaptureScreenshot() / shouldCaptureTrace() / shouldCaptureVideo() — no-arg helpers that combine the capture policy with the outcome of the current or just-finished test. A Selenium / Appium BaseTest needs neither ITestResult nor a TestWatcher:
    @AfterMethod(alwaysRun = true)
    public void tearDown() {
        if (Rl.shouldCaptureScreenshot()) {
            Rl.attach("screen.png", "image/png",
                      ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES));
        }
        driver.quit();
    }

v0.1.5 — New Features Added

Choose a tag to compare

@naveenanimation20 naveenanimation20 released this 27 Sep 02:58

0.1.5

Fixed

  • Rl.attach() / Rl.log() called from @AfterMethod / @AfterEach now land on the test that just finished. Previously the framework listener cleared the current test before the after-hook ran, so teardown screenshots were silently dropped.

Added

  • Rl.shouldCaptureScreenshot() / shouldCaptureTrace() / shouldCaptureVideo() — no-arg helpers that read the capture policy and the outcome of the current-or-just-finished test. A Selenium BaseTest needs neither ITestResult nor a TestWatcher.
  • reporting-labs.screenshot / .trace / .video capture policy: never | on-failure | always | only-on-pass. RlPlaywright honours it automatically (skips trace recording entirely on never).
  • Auto-detected worker count from real thread activity.
  • Auto-detected build / branch / commit / ci chips on GitHub Actions, Jenkins, GitLab CI, CircleCI, Travis, Buildkite, TeamCity and Azure Pipelines. Explicit metadata.* still wins.
  • Default output folder follows the build tool: target/reporting-labs (Maven), build/reporting-labs (Gradle).
  • reporting-labs.open=never|on-failure|always — opens the report in the browser after the run; skipped in CI/headless.
  • TestNG @DataProvider parameters captured automatically as a Parameters block, one row per invocation.

Changed

  • Success message ([reporting-labs] wrote ...) now goes to stdout, not stderr.
  • card added to the default sensitive-key mask list.

Docs: https://reportinglabs.dev/get-started/java

v0.1.0 — first Maven Central release

Choose a tag to compare

@naveenanimation20 naveenanimation20 released this 26 Sep 16:38

First release of reportingLabs for Java on Maven Central 🎉

Same self-contained HTML report as the Node.js side — one file, no server, no login, no expiry. A Java team's report is byte-for-byte the report a JavaScript team opens.

Artifacts (all on Maven Central under dev.reportinglabs)

Artifact Purpose
reporting-labs-core Engine, annotations and Rl.* runtime helpers. Framework-agnostic.
reporting-labs-junit5 JUnit 5 Extension, auto-registered via ServiceLoader.
reporting-labs-testng TestNG listener, auto-registered via ServiceLoader.
reporting-labs-playwright One-line auto-capture for Playwright for Java.

Install

JUnit 5

<dependency>
  <groupId>dev.reportinglabs</groupId>
  <artifactId>reporting-labs-junit5</artifactId>
  <version>0.1.0</version>
  <scope>test</scope>
</dependency>

Add src/test/resources/junit-platform.properties:

junit.jupiter.extensions.autodetection.enabled=true

Run mvn test. Open reporting-labs/index.html.

TestNG

<dependency>
  <groupId>dev.reportinglabs</groupId>
  <artifactId>reporting-labs-testng</artifactId>
  <version>0.1.0</version>
  <scope>test</scope>
</dependency>

Auto-registers via ServiceLoader — no <listeners> block needed in testng.xml.

A first tagged test

import dev.reportinglabs.core.Rl;
import dev.reportinglabs.core.annotations.*;
import org.junit.jupiter.api.Test;
import java.util.Map;

@Owner("naveen") @Feature("checkout")
class CheckoutTest {

  @Test @Priority("P0") @Severity("blocker") @Story("SHOP-231")
  void places_an_order_with_a_saved_card() {
    Rl.testData("Cart snapshot", Map.of(
      "user", "demo@shop.io", "card", "4242…", "total", 99.90));
    Rl.log("opening checkout");
    // your existing Selenium / Playwright / plain Java code — no wrappers
  }
}

Playwright for Java — auto-capture

import dev.reportinglabs.playwright.RlPlaywright;
import com.microsoft.playwright.*;

@BeforeEach
void setup() {
  playwright = Playwright.create();
  browser    = playwright.chromium().launch();
  page       = browser.newPage();
  RlPlaywright.attach(page);   // <-- one line does everything
}

That one line gives you:

  • Every request / response recorded as an API call in the report
  • A Playwright trace started and attached on test finish
  • A full-page screenshot on failure

What's inside

  • 10 annotations — @Priority, @Severity, @Owner, @Feature, @Story, @Epic, @Issue, @Component, @Team, @Meta
  • Rl.* runtime helpers — Rl.log(), Rl.testData(), Rl.api(), Rl.attach(), Rl.meta()
  • Sensitive-key masking — password, token, authorization, cvv, apiKey, etc. auto-masked
  • History + trend chart — reporting-labs.history.json powers the pass-rate trend
  • Failure clusters — thirty red tests that share one error read as one problem
  • Same six tabs as the Node.js reporter — Overview, Tests, Failures, API, Graphs, Timeline
  • Works with anything — Selenium, Playwright, REST Assured, Karate, plain code — same Rl.* surface

Docs

Requirements

  • JDK 11+
  • Maven 3.9+ or Gradle 8+
  • JUnit Jupiter 5.10+ (for reporting-labs-junit5)
  • TestNG 7.10+ (for reporting-labs-testng)
  • Playwright for Java 1.47+ (for reporting-labs-playwright)