d4vke
7 years agoOccasional Contributor
Groovy script - How to run a teststep from another testsuite in your testsuite teardown script?
I'm able to run a testcase teardown script in my testsuite TS1 that runs a teststep from another testsuite TS2.
testRunner.testCase.testSuite.project.testSuites["TS2"].testCases["TC2"].testSteps["STEP2"].run(testRunner, context);
But as this teststep should run for all my testcases in TS1, I need to add the teardown script for each testcase.
I want to know if I could achieve the same thing directly from the testsuite teardown script, which would save me a lot of script maintenance.
Unfortunately the testrunner object is not available at testsuite level, but I don't know how (or if it's possible) to do it using the runner object.
Any help is much appreciated!