Forum Discussion

abhishekvv's avatar
New Member
8 years ago

Calling a grovvy script from another groovy script in Soap UI

Hi ,


I have created three groovy scripts in Soap UI

Groovy_1, Groovy_2 and Groovy_3.

All these three scripts fetch data from a CSV file stored in some location.


I need to create another groovy script which can execute above three groovy scrip in below sequence, 

First execute Groovy_1 and then after sometime execute Groovy_2 and Groovy_3.


How can I create that single groovy script which can call above three gro0vy scripts




1 Reply

  • kondasamy's avatar
    Regular Contributor

    This is not at all required as you can merge all the scripts into a single groovy script test step.


    Anyhow, your scenario should be possible if you make 3 different groovy script test step. At the end of Groovy Script test step 1 -> you should call/ run the Groovy script 2 test step through the below step.


    testRunner.testCase.getTestStepByName("Groovy Script 2").run(testRunner, context)

    This should be repeated for the forthcoming test steps.