Forum Discussion

Logica_Norway's avatar
Logica_Norway
Occasional Contributor
15 years ago

setting delay programatically before teststeps get executed in a load test

Hi

How to set the delay progrogrmatically before teststeps get executed ina load test

it would be great if you can provide some sample code

Thanks & Regards
Karthik M

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    if you have a Delay TestStep in your TestCase, you can set the delay with a groovy script:

    testRunner.testCase.testSteps["Delay Step"].delay = 12345

    or you can set the delay itself with a script-property-expansion;

    ${=(int)Math.random()*1000}

    (which will delay randomly 0-999 ms)

    regards!

    /Ole
    eviware.com