Integrate Merv Report in Your Cucumber Project

Use the merv-client Cucumber plugin to capture every scenario, step, tag, and timing into local HTML and JSON. With Merv-Local, execution data stays on disk — you get a full suite report, a multi-run dashboard (index.html), consolidated history per test case, and KPI charts built from your report folders.

1. Merv-Local with Cucumber

Mode merv.properties What happens
Merv-Local (offline reports) Set merv.local=true Execution data stays on disk: timestamped folders under your report root, merv-report.json, live and final merv-report.html, and an updated local dashboard at index.html.

If merv.local is omitted, the client follows its default (see merv-client); set it explicitly to avoid surprises.

2. Add the dependency

Include merv-client-api in the same Maven module where Cucumber runs (or a shared test module):

<dependency>
  <groupId>io.github.techelliiptica</groupId>
  <artifactId>merv-client-api</artifactId>
  <version>3.0.0</version>
</dependency>

Use the current version from Maven Central if newer.

3. Configure merv.properties

Copy merv.properties.example from the client JAR sources to your project root (working directory) as merv.properties. For local reports, the essentials are:

4. Register the Cucumber plugin

Register the class org.teche.merv.client.plugin.MervCucumberHandler as a Cucumber plugin so it receives test-run events:

The handler implements ConcurrentEventListener, so it is safe to use with parallel scenarios; step and case IDs are tracked per thread.

5. What gets generated on disk (Merv-Local)

Under your configured report root:

Path Purpose
index.html Local dashboard: all runs, search, execution trend chart, links into each suite, plus Consolidated Report and KPIs (see below).
<run folder>/html/merv-report-live.html Live-updating suite view while tests run (polls JSON).
<run folder>/html/merv-report.html Final suite report after the run (snapshot from live).
<run folder>/json/merv-report.json Source of truth for the dashboard, KPIs, and consolidated views.

Opening index.html in a browser (file or static server) is the recommended entry point for operators and leads.

6. Per-run suite report (HTML)

Each run’s HTML report is designed for drill-down debugging and sign-off:

7. Local dashboard: Test Suites view

The Test Suites tab on index.html lists every run folder with title, pass/fail/skip counts, tag pills, and badges for Completed vs In progress. From each card you can open the suite HTML or copy paths. A live execution chart at the top shows pass (green) and fail (red) activity over a selectable time window (1 hour to custom range), aggregated across listed runs, with periodic refresh while you develop.

8. Consolidated Report

The consolidated views roll up all merv-report.json files under the report root so you see history without opening each run separately.

8.1 TestCase Summary (TestCase View)

A searchable table with one row per logical test case name:

Expand rows to see per-suite, per-folder breakdowns and deep links where applicable.

8.2 Tag / Group Based Summary

Groups rows by Cucumber tags. A scenario with multiple tags appears under each tag section. Clicking a tag can filter the consolidated search. This matches how teams slice regression (@smoke, @regression, @wip, etc.).

9. KPIs (Chart.js analytics)

The KPIs tab turns the same JSON snapshots into management-friendly charts. You can limit the scope to the last 20 / 30 / 50 / all / custom N builds so trends stay readable in busy pipelines.

10. Deleting runs and refreshing the index

The dashboard can integrate with a small local delete API so stale folders can be removed and index.html regenerated; see ReportsDeleteServer and MervReportsIndexHtmlWriter in the merv-client source. After manual folder deletes, regenerate or rerun a suite so the index writer runs, or re-open processes documented in LOCAL_REPORTS_CONTEXT.md.

11. Further reading

← Back to home