pytest-dev / pytest-bdd

BDD library for the py.test runner
https://pytest-bdd.readthedocs.io/en/latest/
MIT License
1.3k stars 219 forks source link

feature request: Use different colour for step arguments in terminal output #604

Open jamiekt opened 1 year ago

jamiekt commented 1 year ago

I have a feature defined like so:

Feature: Eating bananas
    Scenario Outline: Outlined given, when, then
        Given there are <start> bananas
        When I eat <eat> bananas
        Then I should have <left> bananas

        Examples:
        | start | eat | left |
        |  12   |  5  |  7   |
        |  12   |  3  |  9   |

The terminal output (pytest --gherkin-terminal-reporter) appears like so:

Feature: Eating bananas
    Scenario: Outlined given, when, then
        Given there are 12 bananas
        When I eat 5 bananas
        Then I should have 7 bananas
    PASSED

Feature: Eating bananas
    Scenario: Outlined given, when, then
        Given there are 12 bananas
        When I eat 3 bananas
        Then I should have 9 bananas
    PASSED
image

It would be rather nice if the step argument values (12 ,5, 7 then 12, 3, 9 in the examples above) appeared in a different colour.

I don't know how one should raise feature requests for this project so I hope this suffices.