Forum Discussion

AndiKoll's avatar
AndiKoll
Contributor
14 years ago

Dealing with test steps 'Manual teststep' and 'Mock response

Hello,

I have got the following test case:
- doing something (does not matter what) ;-)
- Manual Test Step
- Mock response
- Mock response 2
- Mock repsonse 3

in test step Mock response I set the property 'Start' to Manual Test Step Additionally Mock response 2 Start property is set to Mock response and Mock repsonse 3 Start property is set to Mock response 2 so that the mock response test steps start when the test step before ends.

I expected that the mock response test step starts with klicking on the OK button of the Manual Test Step window.
But: the Mock resonse test step seems to start with the begin of the Manual Test Step so that the following response will be handled independent on when the OK button of the Manual Test Step window is pressed.

Is that behavior a bug or a feature?
When exactly does a Mock response test step start when the Start property is set to an other test step? At the beginning of the test step defined or at the end?
What happends when I define a Mock responses after another (as done in my example)? Does SoapUI trigger on any of the two requests (like a parallel execution of mock resopnse test steps) or shall they be handled sequentially?

To avoid the behavior described above I added a Delay test step after the Manual test step with a minimum of delay time (1ms).

Greetings
Andi

2 Replies

  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    I think it would make sense that it starts at the same time as the start step. In the case where the Mock Response would be waiting for a post from a server that was triggered by a previous request step, it is conceivable that the server could send it before the response was received or parsed by the request step. If the Mock Response only started listening after the request step was complete, the post from the server would be missed.
  • I agree that it's useful when the test step starts at the same time as the test step defined in Start Step property - sometimes.
    It's also useful when the test step starts after the test step before - especially when I want to test the sequence of messages. This can not be done when the sequence of messages is not quite clear defined - as it is when I define a start step sequentially in several test cases.

    My example shows several mock responses after each other. Each test step defines the previous one as Start Step:
    - Groovy script
    - Mock response 1 with Start Step Groovy script
    - Mock response 2 with Start Step Mock response 1
    - Mock repsonse 3 with Start Step Mock response 2

    If the test step in question starts at the same time as the test step defined in the Start Step property does that mean that all test steps start parallelly?
    In my example it would mean that Mock response 1, Mock response 2 and Mock response 3 would start at the same time as Groov script.

    I suggest that the user can define when the test step should start - at the begin or at the end of the test step defined in Start Step property.