Passing scenario tags at runtime when building with Jenkins
When running automated tests, you might want to classify different features and scenarios into different tags for better management.
This tutorial guides you through how to set your scenario tags to be executed at runtime when Jenkins Build triggers your tests.
Requirements
- Jenkins is already installed. See Jenkins documentation on Installing Jenkins.
- Katalon plugin is already installed on Jenkins. See How to use Katalon plugin for Jenkins on Windows.
- An active Katalon Runtime Engine license.
Create Global Variables
You can change global variable values in a test suite during runtime without affecting other test suites. Therefore, using a global variable as a parameter in the keyword runFeatureFolderWithTags
can save you time when you have many tags to manage.
Update Global Variables during runtime
To change the global variable by your desired scenario tags during runtime, use the following command syntax -g_XXX
, for example, -g_userName="admin"
.
Read more about running Cucumber feature files at BDD Testing Framework (Cucumber integration).