Ivan Baranov
Ivan Baranov

Reputation: 27

Continuosly running mocks while executing tests with Citrus Framework

I need to write automated tests for Enterprise Service Bus (ESB). When ESB is running it performs different scheduled operations including DB queries, SOAP and TCP calls, etc. Also it periodically checks whether some services are active and stops flows in case it is not.

So in my case there will be some problems:

Is it possible to have mocks continuosly running while executing tests using Citrus Framework?

How else can I overcome this problems with Citrus?

Upvotes: 0

Views: 237

Answers (1)

Christoph Deppisch
Christoph Deppisch

Reputation: 2216

Please note that all server components in Citrus do only live while tests are executed. This is because Citrus automatically starts and stops the server components before/after the test suite. When Citrus is inactive the server components are stopped.

If you want to break these limitations please have a look at the citrus-simulator side project which is a complete standalone simulator for different message transport types (still in beta phase though).

If the limitation mentioned before is Ok for you then you can use a combination of endpoint adapters on the server components in your Citrus project. You could have a static endpoint adapter that always sends a positive response for incoming health check requests.

Please see the documentation on endpoint adapters: http://www.citrusframework.org/reference/html/endpoint-adapter.html

Upvotes: 1

Related Questions