pytest-dev / pytest-dev/pytest-bdd
--gherkin-terminal-reporter doesn't color steps correctly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 251
- Avg merge
- 43m
- Merged PRs (30d)
- 2
Description
The gherkin terminal reporter doesn't color the steps correctly.
Let's say I have the following feature with a broken step:
Scenario: Publishing the article
Given I'm an author user
And I have an article
When I go to the article page # This step is broken
And I press the publish button
Then I should not see the error message
And the article should be published
I expect the output to look like this (the first word in each line is the colouring):
RED: Scenario: Publishing the article
GREEN: Given I'm an author user
GREEN: And I have an article
RED: When I go to the article page # This step is broken
RED: And I press the publish button
RED: Then I should not see the error message
RED: And the article should be published
RED: FAILED
But instead I get an output with all lines in red.
Printing the steps after the failed one is optional.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the example feature with --gherkin-terminal-reporter and inspect the gherkin terminal reporter entry point. Trace how step results are mapped to colors after the first failure. Done means the scenario and steps use the expected red/green output, with later steps optionally omitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100