Scripting - Test Case Timing - Sleep to delay / wait

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in SOAtest
Hey guys I think i'm running across some transaction timing issues with my test cases which may be causing some data corruption at my service endpoint. I've been toying around with the folder level test case logic features but I can't seem to get what I want.

Is there a way to put a pause in top to bottom execution per test case or per test suite?

Thanks,

LeapTester
Tagged:

Comments

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    LeapTester,

    For each delay that you want to occur between a test, you'll need to add a method tool that has the following content:
    CODE
    from soaptest.api import SOAPUtil
    def addDelay():
       SOAPUtil.sleep(3000)

    I've attached an example project that shows you how this can be done. For convenience, (if you have a lot of delays that need to be added), I've also shown in my example how to create a global tool so that the method tool needs to be created only once and then can be quickly added multiple times in your test suites. When you add the tool using the "right-click" menu, you'll choose "Existing" instead of "New Tool".

    -Mike
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Awesome!

    Thx again,

    -LT-
Sign In or Register to comment.