When executing BDD, I need to pick scenarios according according to attributes like
- environment (some test cases only work in a particular env)
- network (some only work from intra, others only from internet)
- smoke or full regression set.
As above can change at any time due to new requirements, I am using tags to assign the attributes.
However, if I want to use the tags, I need to be using the CucumberRunner and in my understanding need as many Runner classes as there are combinations of my attributes (as tags are passed in into Cucumber.class by way of annotation).
I’d rather want to define all required tags in respective profile (e.g. in a global variable) and then use that to dynamically execute the same Runner class with appropriate tags.
For maintanance I would then only need to change the ‘speaking’ profile.
profile A - @env1 and @internet and @smoke - executes scenarios with those tags
profile B - @env2 and @intranet and @full_regression and not @something - executes scenarios with those tags
Is that possible in Katalon Studio? If not, what could be alternatives to ensure run configuration can be in one place (vs. different profiles calling different runners) or at least most comfortable?
In generic Selenium/Cucumber I guess it would probably work along the lines of https://github.com/abcautomate/Selenium/blob/master/Misc/cucumber/src/test/java/com/abca/learn/CustomCucumber.java
Thanks for your help!