Using Library DataDriver, I’m unable to run tests from command line filtering by tags, if tags are part of input file i.e. data.csv
Consider below is my input data file (.csv)
** Test Cases ***;${username};${password};[Tags];[Documentation]
Right user empty pass;demo;${EMPTY};smoke;This is a test case documentation
Right user wrong pass;demo;FooBar;regression;This is a test case documentation
Now if I am executing the .robot test from CLI as below
robot --include smoke .robot
Above throws error "Suite contains no tests matching tag ‘smoke’ "
Because test cases that are created by DataDriver after parsing while execution, it is not possible to use some Robot Framework® methods to select test cases.
Examples for options that have to be used differently:
|robot option|Description|
| --- | --- |
|`--test`|Selects the test cases by name.|
|`--task`|Alias for --test that can be used when executing tasks.|
|`--rerunfailed`|Selects failed tests from an earlier output file to be re-executed.|
|`--include`|Selects the test cases by tag.|
|`--exclude`|Selects the test cases by tag.|