Cucumber allows us to manage large groups of scenarios easier with tags. Tags are free-form text comments assigned to a scenario, that provide meta-data about the type, nature or group of that scenario. You can assign tags to a scenario by putting it before the scenario header, adding an ‘at’ sign (@) before the tag name.
For example:
For example:
@slowtest
Scenario: end-to-end signup
...
You can execute only the scenarios with a particular tag using the --tags option, for example:
cucumber --tags @fasttest
Another option is to skip only the scenarios without a particular tag. For
that, prefix the tag with a tilde (~). Here is an example:
cucumber --tags ~@slowtest
No comments:
Post a Comment