CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

testland/living-documentation-publisher

Use when BDD scenarios pass in CI and stakeholders need an always-current, readable report of which acceptance criteria pass. Turns Cucumber JSON into HTML living documentation (multiple-cucumber-html-reporter or Serenity BDD) and publishes it to GitHub or GitLab Pages.

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

node-reporter.mdreferences/

Node report renderer: multiple-cucumber-html-reporter

Renders Cucumber JSON into a stakeholder HTML report for any Cucumber-JS project. Referenced from living-documentation-publisher Step 2.

Install

Install the reporter as a dev dependency (multiple-cucumber-html-reporter installation):

npm install multiple-cucumber-html-reporter --save-dev

Timestamped JSON for parallel shards

Use a timestamped filename when running parallel shards to avoid overwrite (multiple-cucumber-html-reporter usage):

cucumber-js features/ \
  --format json:reports/cucumber-$(date +%s).json

Generate the report

Create scripts/generate-report.js:

const report = require("multiple-cucumber-html-reporter");

report.generate({
  // required
  jsonDir: "./reports/",
  reportPath: "./docs/living-documentation/",

  // identification metadata shown in the report header
  metadata: {
    browser: { name: "chrome", version: "latest" },
    device: "CI runner",
    platform: { name: "linux", version: "22.04" }
  },

  // custom info block (release, project, branch)
  customData: {
    title: "Run info",
    data: [
      { label: "Project", value: "Checkout Service" },
      { label: "Release", value: process.env.RELEASE_TAG || "dev" }
    ]
  },

  // display options
  reportName:      "Checkout Service - Living Documentation",
  pageTitle:       "Acceptance Criteria Status",
  displayDuration: true,
  durationInMS:    true
});

Run it after the test step (multiple-cucumber-html-reporter usage):

npm test && node scripts/generate-report.js

Options

Key options from the official docs (multiple-cucumber-html-reporter options):

OptionTypeDefaultPurpose
jsonDirStringrequiredDirectory of Cucumber JSON files
reportPathStringrequiredOutput directory for the HTML report
reportNameStringTitle displayed in the UI
pageTitleString"Multiple Cucumber HTML Reporter"HTML <head> title
displayDurationBooleanfalseShow step/scenario timing
durationInMSBooleanfalseInterpret step durations as ms not ns
saveCollectedJSONBooleanfalseKeep merged JSON for debugging
customStylePathAppend a CSS file for brand colours
overrideStylePathReplace all default CSS

Sources

  • mchr-install - installation: npm/yarn/pnpm, CucumberJS version compatibility matrix.
  • mchr-usage - usage: AfterFeatures hook (CucumberJS 2.x) vs. separate post-test script (3.x+), timestamped JSON filenames.
  • mchr-opts - options: jsonDir, reportPath, reportName, pageTitle, displayDuration, durationInMS, saveCollectedJSON, customStyle, overrideStyle full option table.

SKILL.md

tile.json