Forum Discussion

ktomek's avatar
ktomek
New Contributor
14 years ago

loadUI and limited output from modularized soapUI project

Hi,
I'm trying to use modularized soapUI 4.5.1 project with loadUI 2.1.0. My sopaUI project structure is as follows:
* There are several TestCases with request TestStep with TestCase level properties: Request1, Request2, ...
* There are several TestCases which are using above TestCases with Run TestCase TestSteps to simulate complex operations: Operation1, Operation2, ...
* There is one step that calls (using Run TestCase TestStep) all operations sequentially: TestOperations.

When I run TestCase TestOperations from soapUI, I can see all request, that has been called with their time taken: TestOperations, Operation1, Operation2, ... Request1, Request2, ... .
But when I run TestCase TestOperations from loadUI (with output level TestCase and all TestSteps), the output from soapUIRunner contains only information about TestOperations, Operation1, Operation2, ... and no information about Request1, Request2, ....

Does this mean that I must refactor my modularized soapUI project and replace Operation1, Operation2, ... with actual calls to Request1, Request2, ...?
Or remove TestCase TestOperations and replace it with n (n is the number of Operations) soapUIRunner components?

Regards
Tomek

2 Replies

  • ktomek's avatar
    ktomek
    New Contributor
    I have also noticed, that only TestCase request have in message fields Bytes and soapui_context.
    Request TestSteps have only ID, Status, TimeTaken and Timestamp with no information about Bytes and soapui_context.
    How can I get info about Bytes per request, not the whole TestCase?

    UPDATE:
    I've found a place in src of SoapUISamplerComponent, where output message is constructed for TestStep:

    TerminalMessage message = SoapUISamplerComponent.this.getContext().newMessage();

    message.put("ID", result.getTestStep().getName());
    message.put("Status", Boolean.valueOf(result.getStatus() == TestStepResult.TestStepStatus.OK));
    message.put("TimeTaken", Long.valueOf(result.getTimeTaken()));
    message.put("Timestamp", Long.valueOf(result.getTimeStamp()));

    SoapUISamplerComponent.this.getContext().send(SoapUISamplerComponent.this.getResultTerminal(), message);

    Could You add the following line to method afterStep in class TestStepNotifier inside SoapUISamplerComponent class?
    message.put("Bytes", Integer.valueOf(result.getSize()));

    Tomek
  • ktomek's avatar
    ktomek
    New Contributor
    I've found another problem with results from soapUI Runner.
    The result Status of failed call to Request1 TestCase (this is the Run TestCase TestStep) is wrong.
    Call finished with status 500, but with no assertions on response (I don't need functional assertions when I test performance), the Status field returned has value 'true', which is far from real result. Here's a proof:

    10:02:18,971 DEBUG [HttpClientSupport$SoapUIHttpClient] Stale connection check
    10:02:18,972 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
    10:02:18,972 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /ws/IndvPrsn HTTP/1.1
    10:02:19,004 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 500 Internal Server Error
    10:02:19,004 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely
    message==[TimeTaken:38, Timestamp:1342425738964, Status:true, ID:Request1]

    As You can see, request finished with HTTP Status Code = 500 (Internal Server Error), but Status in the message says the request has finished successfully (Status = 'true').
    With acces to soapui_context (I have it on the TestCase level, but not on Request TestStep or Run TestCase TestStep level) I can check manually the real Status code in custom component, eg.:
    soapui_context = message.get('soapui_context')
    status_code = soapui_context.get('httpResponse').getStatusCode()
    if ( status_code != 200 ) {
    // Here we know that request finished with error
    }

    Another thing is value in TimeTaken field. The returned value is 38, while "Sending request" 10:02:19,004 - 10:02:18,972 "Receiving response" = 32.
    Here the difference is only 6 ms, but I've had earlier results, where TimeTaken was greater than 700 ms, but real execution time was below 100ms.
    It sometimes happens with the first TriggerTimestamp from VU Generator (eg. Fixed Rate Component), when soapUIComponent has some delays while initializing.
    As far as I know, the reason of such big difference in TimeTaken value is usage of TriggerTimestamp value as a start, instead of timestamp from "Sending request".
    Again with access to soapui_context I can extract better value for TimeTaken:
    TimeTaken = soapui_context.get('httpResponse').getTimeTaken()
    But as before, the soapui_context is only available on the TestCase level, but now below that.

    Regards,
    Tomek