Skip to content

Results and retries

Each attempt of a scenario is one result, in the order the attempts ran:

  • A scenario that is not retried sends one result.
  • A scenario that fails once and then passes, with --retry, arrives as two results of one key: the failed attempt, then the passed one.
  • Each row of a Scenario Outline is a result of its own, recorded on the run case with its values.
Terminal window
npx cucumber-js --retry 2 --format @probara/cucumber-reporter

Every attempt stays in the case’s history. The run case keeps the last outcome.

Every result has one of four statuses: passed, failed, skipped or blocked. The reporter sends passed, failed and skipped. blocked comes from status mapping.

Cucumber’s statusProbara’s statusWhy
passedpassedThe step ran and passed.
failedfailedThe step ran and failed. Its message is the step’s error.
ambiguousfailedMore than one definition matches the step. Its message says so.
skipped, pending, undefined, unknownskippedThe step did not run: it is skipped, has no definition, or is pending.

Cucumber’s report spells these in lowercase (its JSON report) or in uppercase (its Messages). The reporter reads both.

A scenario, or one row of an outline, is:

  1. failed when any of its steps failed, or any of its Before or After hooks failed;
  2. otherwise skipped when any of its steps did not run;
  3. otherwise passed.

statusMapping sends a status as another, and statusFilter leaves results with those statuses out of the report, after the mapping. For example, PROBARA_STATUS_MAPPING=failed=blocked and PROBARA_STATUS_FILTER=skipped send every failed scenario as blocked, and send no skipped one.

A step’s duration is its own. A scenario’s duration is the sum of its steps and hooks, in milliseconds. The start of each attempt is sent as its executedAt.

When Probara cannot take a result, the reporter can keep it in a file to send later. Set resultsFile (PROBARA_RESULTS_FILE=reports/probara-results.json): at the end of the run, every result that was not sent is written there. With reporting off, every result is written there.

The file is never overwritten. When one is already there, the reporter writes to the first free name beside it (probara-results-2.json, and so on), and the summary line says where it went.

To send the file later, run the CLI with the same token and project:

Terminal window
npx @probara/cli import results 'reports/probara-results*.json'

Its results keep their keys and their case links.

assignFailedTo (PROBARA_ASSIGN_FAILED_TO=ana@example.com,bo@example.com) assigns each failed result that has no assignee to one of the members it names, in turn.