Forum Discussion

AAichholzer's avatar
AAichholzer
Occasional Contributor
12 years ago

[Resoolved] Edit TestCase StartUpScript from GROOVY Script

Hi
I have to add a startUp script to all existing testcases.
Is there any way to do this with a groovy script, because there are many testcases......??

best regards

Horst
  • Cizo89's avatar
    Cizo89
    Frequent Contributor
    Hi Horst,

    try this script, this should change the setupScript for all your TestCases in all TestSuites:

    //add your script here
    String setupScript = ""

    testRunner.testCase.testSuite.project.getTestSuiteList().each{
    it.getTestCaseList().each{
    it.setSetupScript(setupScript)
    }
    }


    Regards,
    Marek