radish-bdd / radish

Behavior Driven Development tooling for Python. The root from red to green.
https://radish-bdd.github.io
MIT License
180 stars 49 forks source link

Tags on examples not supported #416

Closed randomcoder closed 1 year ago

randomcoder commented 3 years ago

Radish Version: 0.13.4 Python Version: 3.8 Platform: Mac / Linux

Problem

A feature/scenario outline with a tag on an Examples: block fails initial parsing, e.g. given

Scenario Outline: A simple cucumber scenario outline
    Given I have <initial> cucumbers in the basket
    When I add <added> cucumbers
    Then I have <total> cucumbers in the masket

    @loads_of_cukes
    Examples:
        | initial | added | total |
        | 20      | 50    | 70    |

running radish gives the following error

Error: The parser expected a scenario or a tag on this line. Given: 'Examples:'

Error Oracle says:
You have a SyntaxError in your feature file!
Please have a look into the radish documentation to find out which
features radish supports and how you could use them:
Link: https://github.com/radish-bdd/radish

If I remove the @loads_of_cukes tag it is fine.

This is a feature I have used in other Cucumber implementations (cucumber-jvm for example) as it a requirement for our test management system that requires a unique id for each example set.

According to https://cucumber.io/docs/cucumber/api/#tags Examples is a valid tag location.

fliiiix commented 3 years ago

I thought this is easy to fix. I was wrong. Not sure if I find time to fix this. But happy to merge and release a fix for that if someone has time to fix this.

fliiiix commented 1 year ago

fixed but never closed https://github.com/radish-bdd/radish/blob/88ede01545008abdb05b148c8f97b6996811121c/tests/features/tags-everywhere.feature#L20