Forum Discussion

LChristian's avatar
LChristian
Occasional Contributor
15 years ago

Prob w/ retrieving SOAP response contents while load testing

Hello,

I have a test case that contains two steps. First it makes a SOAP request to a web service and receives a valid response. Second is a script that grabs the response content from the first step and does some manipulation on it. The problem that I'm running into is that when I create a load test for this test case with 2+ threads the script will grab incorrect information as the response content. I'm fairly certain that it's my call to grab the response content from the previous step which is incorrect but I don't know of any other suitable ways of accomplishing this.

Code for retrieving response content:
context.getTestCase().getChildren()[testRunner.getRunContext().getCurrentStepIndex() - 1].getTestRequest().getResponseContent()


Does soapUI provide anything in terms of synchronization or is there just something I'm missing?

Examples:

Response in script from single thread:
http://pastebin.com/teySUPzd

Response in script from 2+ threads:
http://pastebin.com/sZMrkaRj
(Scheme does not allow multiple NetTieSchedules elements with same day attribute)

Thanks!

2 Replies

  • Hello,

    Not sure why this would be occurring. You could try using property expansions to get the response instead:


    context.expand( '${YourTestRequest#Response}' ) //Replace YourTestRequest with the name of your test request.


    You may also want to make sure that it isn't your server that is sending you the invalid responses, using an external tool like Wireshark or TcpMon. Good luck!

    Regards,
    Dain
    eviware.com
  • LChristian's avatar
    LChristian
    Occasional Contributor
    The property expansion has seemed to fix the initial issue. Now it seems our server doesn't like concurrent requests from 8 different threads. One of the threads had to wait ~40 seconds to get an HTTPS response =S

    Thanks, this issue is resolved.