Migrating and upgrading
From probara import cucumber
Section titled “From probara import cucumber”If you already send the Cucumber JSON report with probara import cucumber, the reporter finds the same
cases. It builds the same keys as the sync and the import, so switching keeps each scenario on its case
and its history.
Switching takes three steps:
- Install the reporter next to cucumber-js:
npm install --save-dev @probara/cucumber-reporter. - Add it to
formatincucumber.js, with your Project ID informatOptions.probara, as the quick start shows. - Remove the
cucumber-js --format json:...step and theprobara import cucumberstep from your pipeline. Keep the sync step.
Remove the import step once the reporter runs. An import after a run that the reporter already reported creates a second run with the same results.
What changes:
- The results are sent at the end of the run, from the same command, not in a later step.
- The files a scenario attaches with
this.attach,this.logandthis.linkare uploaded. The import sends no attachments.
Keep probara import cucumber for the reports of Cucumber-JVM, playwright-bdd and other tools that write
Cucumber JSON. The reporter is for cucumber-js. The CLI page
describes that command.
From Qase’s cucumber-js reporter
Section titled “From Qase’s cucumber-js reporter”qase-cucumberjs links a
scenario to a Qase case with a tag, and sends its results to Qase. This reporter does the same for
Probara, with two differences: the scenarios come from Git through probara sync gherkin, and the link
is the @probara:<ID> tag.
| What | Qase | Probara |
|---|---|---|
| Package | qase-cucumberjs | @probara/cucumber-reporter, with @cucumber/cucumber |
| Link a scenario | @QaseID=12 | @probara:SHOP-12 (the case’s display ID) |
| Token and project | QASE_TESTOPS_API_TOKEN, QASE_TESTOPS_PROJECT | PROBARA_API_TOKEN, PROBARA_PROJECT |
| Cases | Created by the reports | Synced from the feature files, then linked by key |
| Attachments | Sent by the reporter | Sent by the reporter, with this.attach, this.log and this.link |
- Remove
qase-cucumberjsand its entry fromcucumber.js. - Install the reporter:
npm install --save-dev @probara/cucumber-reporter. - Add it to
formatand setprojectIdinformatOptions.probara, as the quick start shows. - Replace each
@QaseID=<n>tag with@probara:<ID>, using the case’s display ID in Probara. The tag is not a tag of the case: it only links the scenario. - Sync the feature files on the default branch:
npx @probara/cli sync gherkin "features/**/*.feature". A scenario then lands on its case by its key, even before it has a tag.
Upgrading the reporter
Section titled “Upgrading the reporter”Before 1.0, a minor version may bring breaking changes. Pin the version of @probara/cucumber-reporter
in your lockfile, and read the
changelog
before you upgrade.