Reputation: 21
I'm using grunt tasks to run my feature files using grunt cucumberjs
grunt cucumberjs --cucumbertags=@favourite
Above command runs all the scenarios with @favourite tag. I have an issue where i want scenarios to run on different env with diff data that belongs to environment.
@Book
Scenario Outline: Search by Author
When I search for "Leo Tolstoy"
Then I should see "<number_of_books>" books
@qa_env
Examples:
| number_of_books |
| 5 |
@dev_env
Examples:
| number_of_books |
| 3 |
How can I run scenario @Book with @qa_env data and @Book with @dev_env data ?
Upvotes: 1
Views: 2458
Reputation: 2375
From the readme of grunt-cucumber
========================================================================
tags
Type: String or Array
Default: ''
Only execute the features or scenarios with tags matching TAG_EXPRESSION. Scenarios inherit tags declared on the Feature level. The simplest TAG_EXPRESSION is simply a tag. Example: tags: '@dev'
When a tag in a tag expression starts with a ~, this represents boolean NOT. Example: tags: ~@dev
A tag expression can have several tags separated by a comma, which represents logical OR. Example: tags: @dev,@wip
To represent a logical AND, use an array. This is useful if you want to skip certain features and run other specific features. Example: tags: ['~@wip', '@dev']
========================================================================
When you are on Windows you need to mind the usage of single and double quotes
Upvotes: 1