radish-bdd / radish

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

Using Tags fails #397

Closed dschiller closed 4 years ago

dschiller commented 4 years ago

I want to execute a Feature File with a Tag.

radish Tests -b Radish  --tags 'run'
Tests\emailFieldLanguageIsCorrect.feature
@run
Feature: Login Form Labels use correct Language

    The Fields on the Login Form are used in the correct Languages

    @run
    Scenario Outline: Check if the `Email` Textbox Label Language is correct

        Open URL "http://vm2/website"
        Set Language "<Language>"
        Textbox "login" Label is "<Value>"

        Examples:
        |Language|Value                                 |
        |de      |E-Mail- oder Anmeldename              |
        |en      |Email or Login Name                   |

But this result in:

Error: No feature or no scenario specified in at least one of the given feature files
You have specified a tag expression. Make sure those are valid and actually yield some Scenarios to run.

Using Windows and followed this Document: https://radish.readthedocs.io/en/latest/syntax.html#tag

radish==0.1.10
radish-bdd==0.13.1
fliiiix commented 4 years ago

Can you share your step implementation as well?

And have you tried without tags:

radish Tests -b Radish

And with specifying just the one feature:

radish Tests\emailFieldLanguageIsCorrect.feature -b Radish  --tags 'run'
dschiller commented 4 years ago

Without Tags it is working and execute all Scenarios but I want to use Tags if possible to execute specific Scenarios. The step implementation has nothing special but I can provide it tomorrow if needed.

fliiiix commented 4 years ago

Would be appreciated because I rebuilt your setup and it works for me (on Linux at the moment, I will test on Windows as soon as I find the time :))

$ radish Tests -b Radish --tags 'run'
@run
Feature: Login Form Labels use correct Language  # Tests/emailFieldLanguageIsCorrect.feature
    The Fields on the Login Form are used in the correct Languages

    @run
    Scenario Outline: Check if the `Email` Textbox Label Language is correct
        Open URL "http://vm2/website"
        Set Language "<Language>"
        Textbox "login" Label is "<Value>"

    Examples:
        | Language | Value                    |
        | de       | E-Mail- oder Anmeldename |
        | en       | Email or Login Name      |

1 features (1 passed)
2 scenarios (2 passed)
6 steps (6 passed)
Run 1590566970 finished within a moment

On issue might be that you have weird characters after your tag like white space / tabs or similar?

dschiller commented 4 years ago

It doesn't work because of the Singlequotes:

radish Tests -b Radish  --tags 'run'

If one uses Double Quotes then it works:

radish Tests -b Radish  --tags "run"