Sync the .feature files from CI

After checkout, a job on your default branch reads your .feature files and makes the cases match them: a new scenario creates a case, a changed scenario updates its case, and a removed scenario archives it. Change a scenario in its file through a pull request, and its case follows once the change lands.

The pipeline signs in with an app token from the Cucumber card. The sync needs a paid plan, as CI reporting does. Steps use English keywords only: a file in another language stops the sync.

GitHub Actions
- name: Sync the feature files to Probara
  run: npx @probara/cli sync gherkin "features/**/*.feature"
  env:
    PROBARA_API_TOKEN: ${{ secrets.PROBARA_API_TOKEN }}
    PROBARA_PROJECT: ${{ vars.PROBARA_PROJECT }}

Renames and moves keep the case

A scenario keeps its case when you rename it, rename its Feature or move its file within the same sync, as long as its steps, Background and Examples stay the same. To rename a scenario and change its steps in the same commit, bind it to its case with a @probara:SHOP-12 tag.

A removed scenario is archived, never deleted, and waits in Trash. The sync archives only the cases of files that its arguments match, so a folder that another job syncs keeps its cases.

What the sync does
In the repositoryIn Probara
Rename or move, same steps, same syncSame case, under its new key
Change the steps and rename, with a binding tagSame case, kept by its binding
Remove a scenario, file in the sync’s argumentsCase archived, in Trash
Remove a scenario, file outside the argumentsCase not touched

Cucumber scenarios report step by step

Add the Probara reporter to cucumber.js and every scenario is sent at the end of the run, onto the case it synced to: each step with its keyword, status, duration, error, and its Doc String or Data Table. Each row of a Scenario Outline is a result of its own, with the row’s values as its parameters.

The files a step attaches with this.attach, this.log or this.link are uploaded with its result. Sync on the default branch first, because a result finds its case through the key of its scenario.

Probara is tested against cucumber-js 13. For Cucumber-JVM, playwright-bdd or another tool that writes Cucumber JSON, probara import cucumber sends the report after the run instead, and it sends no attachments.

cucumber.js
module.exports = {
  default: {
    format: ['@probara/cucumber-reporter'],
    formatOptions: { probara: { projectId: 'SHOP' } },
  },
};
GitHub Actions
- name: Run the Cucumber scenarios
  run: npx cucumber-js
  env:
    PROBARA_API_TOKEN: ${{ secrets.PROBARA_API_TOKEN }}

The scenario stays read-only in Probara

The title, description, steps, precondition and the tags the file gives the case are locked in Probara. The case shows a Synced from Git badge with the path and line of its scenario, linked to the file when the sync can build the link from your CI or from a link template you pass.

Everything else stays editable: assignee, priority, custom fields other than the precondition, defects, issue links, comments, plan and run membership, and the tags you add. Review does not apply to synced cases, because the pull request that changes the file is their review.

What a synced case locks
Title, description and steps
Read-only in Probara
Precondition and file tags
Read-only in Probara
Assignee, priority and custom fields
Editable in Probara
Defects, issue links and comments
Editable in Probara
Plan and run membership, and your own tags
Editable in Probara

Sync your .feature files to Probara

Create your organization, create an app token from the Cucumber card, and add the sync and the reporter to your pipeline. Every new organization starts on a 14-day Pro trial, with no credit card.