Expose the max number of retries to formatters
- Dominant language
- C#
- Stars
- 41
- Forks
- 24
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 6
Description
Hey @davidjgoss and @charlierudolph!
Would it be possible to make the information about the max number of retries specified via [`--retry`](https://github.com/cucumber/cucumber-js/blob/master/features/retry.feature) parameter available to Cucumber formatters?
At the moment Cucumber messages provide information about the **current** `attempt` number, for example:
```json
{"testCaseStarted":{"attempt":1,"timestamp":{"seconds":"1609892232","nanos":945000000},"testCaseId":"d6c24ef0-66c4-42f7-a62e-2d6b976a40ff","id":"9b5d1c83-09a3-466d-8c14-e3c2b14918ea"}}
```
However, they don't tell how many attempts there are **left**, which makes reporting a bit inconvenient.
Perhaps this information could be added to [`IFormatterOptions`](https://github.com/cucumber/cucumber-js/blob/3d8d2327c794c01fd9c9fca58f4f924b9f9bde7a/src/formatter/index.ts#L20-L31) either to the main `options` object itself or under `parsedArgvOptions`. I think the behaviour could be similar to how the [`RerunFormatter`](https://github.com/cucumber/cucumber-js/blob/3d8d2327c794c01fd9c9fca58f4f924b9f9bde7a/src/formatter/rerun_formatter.ts#L29) works.
Is this a feature you'd be willing to add / review a PR for?
Contributor guide
Assessment
This issue has not been assessed yet.