Releases: naveenautomationlabs/reporting-labs-java
Release list
v0.1.9 — New Features Added for Selenium Java with Bug Fixes
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 perreporting-labs.screenshotwith no teardown code. Works with a driver created once per class/test and reused. Rl.step(title, body)— nested, timed steps (Playwrighttest.stepequivalent); 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.errprinted during a test is captured per test (reporting-labs.captureStdout, defaulttrue). - TestNG
IRetryAnalyzerretries 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
Added
RlPlaywright.record(APIRequestContext)— wrappage.request()orplaywright.request().newContext()and everyget/post/put/patch/delete/head/fetchcall lands in the report with method, URL (query params included), request headers and body (setDataas JSON,setForm/setMultipartas 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
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()returnfalsefor a skipped test, matching the Playwright add-on — no screenshot for skips underalways/only-on-pass.- Trend chart: a priority series that starts with empty runs no longer produces an invalid SVG path.
accent/customCssare applied even when the bundled template lacks their placeholders (injected as a<style>block) — the report is always written.
Added
ReportBuilderTestpins 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
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 (TestNGIConfigurationListener.beforeConfiguration, JUnitBeforeEachCallback). Rl.attach()/Rl.log()called from@AfterMethod/@AfterEachnow 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 (
alwaysandonly-on-passincluded). - JUnit 5 assumption failures (
Assumptions.assumeTrue) are reported as skipped, not failed. reporting-labs.propertiesis read as UTF-8; non-ASCII titles rendered as mojibake before.- Header masking ignores
-and_, soX-Api-Key,x_auth_tokenetc. are masked likeapiKey/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 / AppiumBaseTestneeds neitherITestResultnor aTestWatcher:@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
0.1.5
Fixed
Rl.attach()/Rl.log()called from@AfterMethod/@AfterEachnow 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 SeleniumBaseTestneeds neitherITestResultnor aTestWatcher.reporting-labs.screenshot/.trace/.videocapture policy:never | on-failure | always | only-on-pass.RlPlaywrighthonours it automatically (skips trace recording entirely onnever).- Auto-detected worker count from real thread activity.
- Auto-detected
build/branch/commit/cichips on GitHub Actions, Jenkins, GitLab CI, CircleCI, Travis, Buildkite, TeamCity and Azure Pipelines. Explicitmetadata.*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
@DataProviderparameters captured automatically as a Parameters block, one row per invocation.
Changed
- Success message (
[reporting-labs] wrote ...) now goes to stdout, not stderr. cardadded to the default sensitive-key mask list.
v0.1.0 — first Maven Central release
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=trueRun 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.jsonpowers 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
- Get started: https://reportinglabs.dev/get-started/java
- Report tour: https://reportinglabs.dev/features/report-tour
- Runnable examples:
examples/
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)