This is a cross-platform formatter that produces a pretty HTML report for Cucumber runs.
It is built on top of @cucumber/react-components and works with any
Cucumber implementation with a message
formatter that outputs cucumber messages.
This formatter is built into the following Cucumber implementations:
Supported by: Java and .Net
The formatter can be configured with:
- A custom page title and icon
- Additional CSS to support styling react components.
- Additional Javascript for other customisations.
- The default Javascript and CSS can be replaced to support building custom react components.
The Java and Ruby packages are wrappers that bundle the build artefacts from the Javascript package.
Thus, to work on either the Java or Ruby packages, you will need to have installed Node.js first.
Once you have Node.js installed, you can use:
make prepare
This will build the Javascript package and copy the required artifacts to the Java and Ruby packages.
In the JavaScript package, we use fixtures from the Compatibility Kit (CCK) to generate sample reports, render them in a browser and check them against reference screenshots with Playwright.
If the tests fail, you can see actual vs expected screenshots plus a visual diff for each affected test in the test-results
directory.
If fixtures are added or changed in the CCK, the screenshots will have to be updated accordingly. To do that, run:
npx playwright test --update-snapshots