Documentation

This page focuses on Merv-Local: how report folders, merv-report.json, suite HTML, and the index.html dashboard fit together — including every consolidated view and KPI area. Implementation contracts for contributors live in merv-client/LOCAL_REPORTS_CONTEXT.md in the repo.

What Merv-Local is

Merv-Local writes execution results under a configurable report root on your machine. Each run gets its own timestamped folder. There is no requirement to run the MERV API or UI for these reports to work: the local dashboard (index.html), suite HTML, and Chart.js KPIs all read the same merv-report.json snapshots your test runner (Cucumber, TestNG, JUnit 5, Playwright via merv-client, etc.) produces when integrated with merv-client.

After each meaningful write (or when a run finishes), the client calls MervReportsIndexHtmlWriter.write(reportRoot) so index.html stays in sync with folders on disk. That is how new runs appear in the suite grid and how consolidated and KPI views pick up new data.

Folder layout on disk

Let reportRoot be the directory from MervConfig.getReportFolder() (usually set via merv.report.folder in merv.properties). Typical layout:

Path Role
{reportRoot}/index.html Local dashboard: navigation, suite cards, live execution chart, consolidated subtabs, and KPI panels. Regenerated when runs complete or the index writer runs.
{reportRoot}/{runFolder}/json/merv-report.json Source of truth for the dashboard, consolidated tables, and KPI calculations. The index page loads one JSON per discovered run folder.
{reportRoot}/{runFolder}/html/merv-report-live.html Live suite report while the run is in progress (polls JSON for updates).
{reportRoot}/{runFolder}/html/merv-report.html Final suite report after the run completes (snapshot of the suite view).
{reportRoot}/{runFolder}/screenshots/ Optional images referenced from step rows in JSON/HTML when screenshot capture is enabled and wired for your framework.

Run folder names are commonly like dd-MM-yyyy HH-mm-ss Merv-Report (Cucumber); other integrations should still use the same single segment folder name and the same html/, json/, and optional screenshots/ layout so the dashboard can find them.

JSON as source of truth

Every consumer — suite HTML, live HTML, index.html cards, consolidated views, and KPI scripts — ultimately depends on fields inside each run’s merv-report.json. At a high level the document includes:

If a framework omits optional fields, keep names and statuses accurate so pass/fail/skip counts, KPIs, and navigation still behave. Exact field parity with Cucumber is defined alongside MervCucumberHandler.generateJsonReport in the client source; align new runners with LOCAL_REPORTS_CONTEXT.md.

Per-run suite reports (merv-report-live.html / merv-report.html)

These pages are the drill-down for a single execution folder. They are generated from the same branding and escaping helpers as the rest of Merv-Local HTML (org.teche.merv.client.report.html). Typical behaviour:

From index.html, each suite card links to merv-report.html when the run has finished, or merv-report-live.html while it is still in progress.

index.html local dashboard

Open {reportRoot}/index.html in a browser (file URL or a static file server). The page is a single-page layout with a left sidebar (branding, Merv-Local label, navigation) and a main area that switches between three primary views:

  1. Test Suites — default; lists runs and the live execution chart.
  2. Consolidated Report — three internal subtabs (below).
  3. KPIs — Chart.js analytics driven by the same JSON snapshots, with a configurable build scope.

The top bar includes a search field that filters suite cards by folder name, suite title, and visible tags.

Test Suites view (how it works)

When at least one run folder exists, this view shows two stacked regions:

Live execution chart

A Chart.js time-series chart titled by the selected time window (defaults to the last hour). Preset ranges include 1 hour, 6 hours, 1 day, 1 week, 2 weeks, 1 month, plus Custom (datetime from / to with Apply). The chart aggregates all runs currently listed on the page: green area = test cases completed (pass outcomes) per minute, red line = fail completions per minute. The UI notes that it reflects cases finished per minute, not starts. While you develop, the chart can poll periodically (about every five seconds) so in-progress runs contribute new points without reloading the whole page.

Suite cards grid

Each card corresponds to one run folder. The writer reads that folder’s JSON (and presence of final HTML) to fill:

The first card is marked as the latest run for quick visual emphasis. Cards expose a data-json path so browser scripts can fetch JSON when building consolidated and KPI datasets.

Consolidated Report (all subtabs)

The consolidated view merges every merv-report.json under reportRoot (subject to the same discovery rules as the index writer). It answers “how is this testcase or tag behaving across runs?” without opening each folder. There is a search control for filtering consolidated rows. Three subtabs:

1 — TestCase Summary (TestCase View)

One logical row per test case name aggregated across runs:

Rows can expand to show per-run or per-suite breakdowns and links where the HTML supports deep navigation.

2 — Tag / Group Based Summary

Groups cases by tags (for Cucumber-driven JSON, these are scenario tags). A scenario with multiple tags appears under each relevant tag section. Clicking a tag can drive filtering in the consolidated search so you can focus a slice such as @smoke or @regression.

3 — Failure Summary

Lists failure reasons from the latest execution per testcase. When a test starts passing again, it drops out of this summary automatically, so the tab acts as a “current failures only” triage board. Rows may expand for detail depending on stored failure text in JSON.

KPIs (all sections and how they work)

The KPI view is entirely client-side: embedded JavaScript reads the same JSON files, applies your scope, then updates DOM counters and Chart.js canvases.

Build scope and tag filter

Test execution summary

Aggregates over the scoped runs:

Execution Time & Performance

Uses start/end times on test cases inside each JSON file, plus one duration per run folder for suite-level stats:

Flaky Test Detection

Surfaces tests that have both passed and failed at least once within the current KPI scope. The table includes failed-run counts, passed-run counts, a stability ratio (passes ÷ (passes + fails)), and pass/fail flips. Copy explains that retries are not stored in JSON; failed runs act as a proxy so stability is an approximation from stored outcomes only.

Trend Analysis (build-wise)

Three aligned time-series charts (oldest run on the left, newest on the right):

The sidebar duplicates quick links to scroll directly to Pass % over time, Failures per build, and Execution time trend anchors inside the KPI panel for long pages.

Refreshing the index and deleting runs

Whenever run folders are added, finished, or removed, the on-disk index.html should be regenerated by calling MervReportsIndexHtmlWriter.write(reportRoot) from the runner (Cucumber hook, TestNG listener, etc.). If you delete folders manually, rerun that writer or trigger the same path your integration uses; otherwise cards and KPIs may reference missing JSON.

Optional ReportsDeleteServer (see merv-client sources) integrates with the dashboard so the Delete action on a card can remove a run folder and refresh the index safely.

Framework setup guides (Merv-Local)

Step-by-step integration pages on this site:

Framework Guide
Cucumber (Java) Cucumber + Merv-Local — plugin registration, merv.properties, disk outputs, and feature tour overlapping this page.
TestNG Merv-Local + TestNG
JUnit 5 Merv-Local + JUnit 5
Playwright (JS/TS, npm merv-client) Merv-Local + Playwright — reporter vs MervReport.open(), merv.properties, troubleshooting.

Other in-repo documentation

Reference material elsewhere in the MERV monorepo (not limited to local HTML):

Topic Location
Local reports contract (maintainers) merv-client/LOCAL_REPORTS_CONTEXT.md
Project overview, quick start, Docker README.md (root)
Java client README merv-client/README.md
Playwright / npm client merv-client-js/FRAMEWORK_INTEGRATION.md
Admin user initialization ADMIN_USER_INITIALIZATION.md
Alias feature (suite alias) ALIAS_FEATURE_DOCUMENTATION.md
React UI merv-ui/README.md
Spring API merv-api/README.md
Postman / API testing postman/README.md, postman/QUICK_SETUP.md
Docker deployment DOCKER_DEPLOYMENT.md, docker-compose.yml

API documentation and forum

For the central MERV REST API (users, suites, cases, steps, hierarchy, API keys, files), see API Documentation. Interactive docs: http://<api-host>:7777/swagger-ui.html when the API is running. Postman collections live under postman/.

To report defects or ask questions, use the Forum / Defects page. Forum database fields are described in merv-website/DATABASE_FIELDS.md.

Merv documentation → Cucumber + Local → API Documentation → Forum / Raise a defect →