Closed TheEnjoy closed 3 months ago
@bbortt Hi there, do you have any ideas for a parallel run test that does not require the use of a dynamic adapter?
You need to specify a message selector for step 2 on the receive operation. something like:
$.run(http().server(server)
.receive()
.get()
.selector("citrus_http_request_uri = '/api/fruits"+randomValue+"'")
.validate((message, testContext) -> {
System.out.println(message);
if(message.getHeaders().get("citrus_endpoint_uri").toString().contains(randomValue)){
receiveOK2 = true;
}
})
);
@christophd Thanks, we try https://github.com/citrusframework/citrus/issues/550#issuecomment-445818626 Will be retry
Resolved, selector is work. All work
Citrus Version 4.1.0
Question How do I run api tests in parallel? I want to run a parallel test for JUnit, I use a special property
My code
Send request
Server receive
Problem: For step 2 i have problem. For second thread in mockServer citrus not see client request.
No message received with message selector - retrying in 500ms
I think problem in scope test, when i run parallel test, all requset sends in test1 scope.
i`m check Test1: context.messageStore() - 2 request Test2: context.messageStore() - 0 request (Error: No message received with message selector - retrying in 500ms)
I can create Spring Context for all test, but will it be correct?