Forum Discussion

sbeauvais's avatar
sbeauvais
Contributor
11 years ago

how to speed up testsuite - remove stale connection check?

Hello,

I am running a testsuite with 400+ REST requests. Altogether, it takes about 5 minutes to run. I need to speed this up!

(I cannot run tests simultaneously as there are db dependencies. I see no evidence of memory issues.)

Looking at the log, it appears that "Stale connection check" takes 0.5 seconds (about half the time of every test). What is this step for, and can be it reduced in time or remove altogether?

Thanks for the help.

Severin B.


...
11:19:23,164 INFO [SoapUIProTestCaseRunner] running step [Property Transfer]
11:19:23,164 INFO [SoapUIProTestCaseRunner] running step [PUT location request]
11:19:23,664 DEBUG [HttpClientSupport$SoapUIHttpClient] Stale connection check
11:19:23,680 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
11:19:23,680 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: PUT /pcss-dev/api/locations/14 HTTP/1.1
11:19:23,742 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 204 No Content
11:19:23,742 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely
11:19:23,742 INFO [SoapUIProTestCaseRunner] Assertion [HTTP 200, 201, 204] has status VALID
11:19:23,742 INFO [SoapUIProTestCaseRunner] running step [DataSource Loop]
11:19:23,758 INFO [SoapUIProTestCaseRunner] running step [DataGen]
11:19:23,758 INFO [SoapUIProTestCaseRunner] running step [Property Transfer]
11:19:23,758 INFO [SoapUIProTestCaseRunner] running step [PUT location request]
11:19:24,258 DEBUG [HttpClientSupport$SoapUIHttpClient] Stale connection check
11:19:24,274 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
...

17 Replies

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

    We've now released SoapUI 4.6.4 containing a fix for this issue (SOAP-1264)

    Please try the new version and let us know.

    --
    Regards

    Erik
    SmartBear Sweden
  • Hello.

    I appreciate your help, but the fix is apparently for a proxy issue, and I'm not using a proxy.

    I have just tried my tests on SoapUI Pro 4.6.4 (x64), and the behaviour is the same:

    - the TestCase Log shows that each DataGen took on average 5 ms per row (with the odd higher value)
    - the TestCase Log shows that each PUT request took on average 50 ms per row
    - the TestCase Log shows that each DataSource loop took on average 2 ms per row (with the odd higher value)
    - during execution, I could see a 1/2 second delay between rows
    - the entire TestCase (44 rows) took "2358" (I don't know what this is... a sum of all the delays in ms?)

    - the SoapUI log shows that the "first attempt to execute the request" occurred at 08:52:29
    - the SoapUI log shows about 1/2 second between each "Stale connection check" and the next "attempt to execute request"
    - the SoapUI log shows the final "Connection can be kept alive" at 08:52:50, for a total of 21 seconds, which is about 1/2 second per row

    From this, it still looks like each request is taking on average 50-60 ms per row, but there is a still huge delay somewhere.

    Cheers,
    Severin B.
  • Some quick profiling...

    TestCase 'total' time = 2358 (ms, I assume)
    Time per row = 2358 / 44 = 54 ms

    SoapUI 'elapsed' time = 21 sec
    Time per row = 21,000 / 44 = 477 ms

    Delay = 477 - 54 = 423 ms per row.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Sorry about the confusion. Reading the whole thread it's quite clear to me that this is not a proxy issue, although it was a good guess until you gave us all the information.

    The stale connection check is performed by a third party library - Apache HTTP Client. It is possible to turn it off, but it seems that you can only do it programmatically (by changing the code) and not by configuration. However, I looked at the source code of Apache HTTP Client, and the log statement you're seeing occurs *before* the stale connection check. In other words, something else is causing the delay, and we need to find out what.

    This would be much easier for us if we could reproduce your problem in the development team. There must be something unusual going on in the interaction between SoapUI and your REST service, but at the moment we have no good guess what it is. Is the service you're testing available online, or could you make it available temporarily and share your project file with us, so we can make a serious attempt to reproduce the delays.

    I think you'd better open a support ticket, so you can share as much information about the REST service and test scenarios as possible. As you probably know the form to open a ticket is on this page: http://www.soapui.org/Support/support-overview.html.

    Kind regards,
    Manne
  • Hello,

    I will inquire about giving you access.

    In the meantime, here is a testrunner log, which shows execution time down to the millisecond. In it, you can more clearly see the ~500 ms delay between the logging of the "PUT request" step and the "stale connection check" step (and in any case, before the actual HTTP client "sending request" and "receiving response" steps).

    Let me know if this helps. I'll let you know about access.

    Cheers,
    Severin B.
  • Hello,

    A technical support ticket has been created.

    Please contact me by email for project file and access details.

    Cheers,
    Severin B.