@probara/cucumber-reporter
v0.3.3
Published
Cucumber formatter that sends every scenario and step result to Probara.
Maintainers
Readme
A Cucumber formatter (cucumber-js) that sends every scenario of a run to
Probara at the end of the run: each attempt with its steps, their keywords and data,
their errors and their attachments, keyed like the scenario's synced case. A scenario tagged
@probara:SHOP-12 lands on that case. Cases that are missing get created, and the run is closed once
everything is in.
The formatter reads the feature files only for their keys: run probara sync gherkin
on the default branch so Git holds the cases, then this formatter reports the tests.
Quick start
Install it next to cucumber-js:
npm install --save-dev @cucumber/cucumber @probara/cucumber-reporterSet the token and the project in the environment of the job, and add the formatter to the Cucumber configuration:
// cucumber.js
module.exports = {
default: {
format: ['@probara/cucumber-reporter'],
formatOptions: { probara: { projectId: 'SHOP' } },
},
};PROBARA_API_TOKEN=prb_… npx cucumber-jsEach run prints [probara] lines on stderr and nothing on stdout. cucumber-js gives stdout to one
formatter only, so this one replaces progress: to keep it, give this formatter a path, as in
format: ['progress', '@probara/cucumber-reporter:reports/probara.txt']
(where the output goes). Reporting never changes the
exit code of the run: a run that passes still exits 0 when Probara cannot be reached.
Documentation
- Configuration: every option, its
PROBARA_*variable, and the token. - Linking: the key of a scenario, outlines, and
@probara:<ID>tags. - Steps: keywords, Doc Strings and Data Tables, Background and hooks.
- Attachments:
this.attach,this.logandthis.link. - Statuses and retries.
- Runs and the results file.
- Troubleshooting, coming from Qase.
- CI pipelines: GitHub Actions, GitLab CI, Jenkins, CircleCI, Azure Pipelines, Bitbucket Pipelines and Buildkite.
Sending a Cucumber JSON report instead, after the run, is the
probara import cucumber
command of @probara/cli,
for Cucumber-JVM, playwright-bdd and other tools that write that report.
License
Apache-2.0. See LICENSE.
