jeudi 9 mai 2019

Integration testing with event sourcing systems

I'm working on a PoC where we use CQRS in combination with Event Sourcing. We use the Axon framework and Axon server as toolset.

We have some microservices (Maven packages) with some business logic.

A simple overview of the application flow:

We post a xml message (with REST) to service 1 that will result in an event (with Aggregate). Service 2 handles the event "fired" by service 1 and starts a saga flow. Part of the sage flow is for example to send a mail message.

I can do some tests with Axon Test to test the aggregate from service 1 or the saga from service 2. But is there a good option to do a real integration test where we start with posting a message to the REST interface and check all the operations in the aggregate and saga (inclusive sending mail and so on)

Maybe this kind of integration test is overdone and it's better to test each component on it's own. I doubt what's needed / the best solution to test this type of system.

Aucun commentaire:

Enregistrer un commentaire