pytest-bdd icon indicating copy to clipboard operation
pytest-bdd copied to clipboard

--gherkin-terminal-reporter doesn't color steps correctly

Open akrejczinger opened this issue 8 years ago • 1 comments
trafficstars

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.

akrejczinger avatar Apr 28 '17 17:04 akrejczinger

This would be a great usability boost. Please merge either one of the fixes?

moorchegue avatar May 22 '23 12:05 moorchegue