When I want to use a glue code from specific package using CucumberKW.GLUE = [‘package1’] from inside TestListener and inside @BeforeTestCase
@BeforeTestCase
def beforeTestCase(TestCaseContext testCaseContext) {
CucumberKW.GLUE = [‘package1’]
}
It works from my local but when I run it via Jenkins, It unable to identify and all my tests are failing with below error:
13:49:27 Test Suite Collection ‘Collection1’: 13:49:27 - Test Suite ‘TestSuite1’ runs with All executions retry strategy and 0 retry time(s). 13:49:27 - Test Suite ‘TestSuite2’ runs with All executions retry strategy and 0 retry time(s). 13:49:27 - Test Suite ‘TestSuite3’ runs with All executions retry strategy and 0 retry time(s).
13:49:27 Running: Test Suites/TestSuite1- vm3-remotegrid-gc-headless - 20220121_134817 13:49:27 INFO: KATALON_JAVA_HOME: null 13:49:27 Running: Test Suites/TestSuite2 - vm3-remotegrid-gc-headless - 20220121_134820 13:49:27 INFO: KATALON_JAVA_HOME: null
Please suggest how to fix this issue or some workaround.
Thanks.