Magnus
18 years agoOccasional Contributor
MockResponses listening on different ports in a Load Test
Hi,
How can I achieve so that asynchronous requests that are received by Test Case instances in a Load Test is routed to the right test case instance? The test case consists for example of two steps. One request that is sent to the testing object. The testing object will responde to this request asynchronous at any time. The other step in the test case is a MockResponse that reveives the asynchronous request.
This works just fine if all the requests in the Load Test are executed sequentially. But if they are executed concurrently "which they usually are in a load test" the asynchronous request could reach any test case instance since the MockResponse in all test cases are listening to the same port.
How can this be solved? We tried to use a variable when defining the port in the MockResponse. But it was not possible. Any other suggestions?
Regards,
Magnus
How can I achieve so that asynchronous requests that are received by Test Case instances in a Load Test is routed to the right test case instance? The test case consists for example of two steps. One request that is sent to the testing object. The testing object will responde to this request asynchronous at any time. The other step in the test case is a MockResponse that reveives the asynchronous request.
This works just fine if all the requests in the Load Test are executed sequentially. But if they are executed concurrently "which they usually are in a load test" the asynchronous request could reach any test case instance since the MockResponse in all test cases are listening to the same port.
How can this be solved? We tried to use a variable when defining the port in the MockResponse. But it was not possible. Any other suggestions?
Regards,
Magnus