I’m using a custom Data Reader to port our sparse test data to the Data driver JSON format. Through that I am setting the tags dynamically. I am attempting to selectively run the tests via the include and exclude tags:
-e <tags to exclude> seems to work as expected, and only runs those which do not have those tags on those tests (excluding those that do have any of those tags set)
-i <tag to include> gives back the error
[ ERROR ] Suite <name> contains no tests matching tag <tag to include>
At the moment I am getting around this using multiple exclude parameters rather than a single include
as written in docs you need to add a tag to the template test and include that.
I would recommend to just add a tag “
datadriver” to all DataDriver Suites and then call always:
robot --include datadriver --include <yourDynInclTags> --exclude <yourDynExclTags>
If you do not include the static template test case of the robot file, robot will remove that from execution and the suite with DataDriver will never be executed.
Thanks for the swift response Rene.
So with this method, if we were to use 2
--includes like you’ve exampled above, it would continue to run the entire suite since every test will have the same tag
It seems this is an established limitation - thank you for confirming, it looks like we will have to make use of the
--exclude argument instead