Showing results for 
Search instead for 
Did you mean: 

Groovy soapui API help - creating a delay teststep

Super Contributor

Groovy soapui API help - creating a delay teststep

Need some groovy help to do the following.

I have a test suite with 10 test cases. When my testsuite starts, in the 'setup script' I want to do the following.

if ( testsuite runType == PARALLEL)

1. For all the test cases in my testsuite, I want to insert a delay test step called 'tempdelay' as the first test step.

2. the delay time will equal the testcase#. for example if its the 3rd test case in the testsuite, then the delay=3 second.

3. when the testsuite ends (teardown script), delete all the 'tempdelay' test steps from all the testcases in the testsuite.


Thanks in advance for your help.

Super Contributor

Re: Groovy soapui API help - creating a delay teststep

Hi Ali,

I suggest you create the teststeps manually and disable/enable them from your setup script instead.. (it would make the scripting much easier and less error prone).. does that sound reasonable?


New Here?
Join us and watch the welcome video:
Script Wanted
The new challenge is here!

Create a script to сhange an XPath Match assertion to a JSONPath Match assertion for the TechCorner tag!

Scripts created in July:
- A script to generate an email when an assertion fails
- A script to change the request body before sending it to the server
Top Kudoed Authors