Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
16 years ago

Groovy soapui API help - creating a delay teststep

Hello,
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.


Ali

1 Reply

  • omatzura's avatar
    omatzura
    Super Contributor
    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?

    regards!

    /Ole
    eviware.com