Forum Discussion

zitryss's avatar
zitryss
Occasional Contributor
10 years ago

Asynchronous Service

Hello everyone,   I am trying to create a test case for an asynchronous service, but the problem is that I have 2 different bindings where responses may come from.                And more imp...
  • zitryss's avatar
    zitryss
    10 years ago

    Hi Rupert,

     

    thank you for a nice piece of advice! It helped me very much. I made it a little bit different, but the main approach is the same. Here is how I did it:

     

    1.  I created a TestSuite with 3 TestCases

              0.png

     

    2.  TestSuite was set up to execute all TestCases in parallel

              1.png

     

    3.  Then each of MockResponses contains a TearDown Script

     

         For Callback TC:

    testRunner.testCase.testSuite.getTestCaseByName("Fault").getTestStepByName("Fault").cancel()

         For Fault TC:

    testRunner.testCase.testSuite.getTestCaseByName("Callback").getTestStepByName("Callback").cancel()

     

    4.  And don't forget about timeouts for each.

     

    Here is final result:

     

    2.png

     

    3.png

     

    Kind Regards,

    Eugene