reference-guide icon indicating copy to clipboard operation
reference-guide copied to clipboard

How to test the Query Model

Open janesser opened this issue 6 years ago • 2 comments

The guide demonstrates how easy it is to test aggregates and sagas, i.e. https://docs.axoniq.io/reference-guide/implementing-domain-logic/command-handling/testing and https://docs.axoniq.io/reference-guide/implementing-domain-logic/complex-business-transactions/testing.

It would be great to show ways how to test projections.

There is no evident way to achieve that, despite IntegrationTests starting major portions of the spring-context, especially some entity manager.

Ideally unittesting over projections would be supported.

janesser avatar Mar 04 '19 18:03 janesser

Your voice is heard @janesser, and I feel you've got a good suggestion here. We've been discussing such a topic internally too; as soon as it's also the users who're asking about it, then I feel we should take that gut feel serious. So, thanks for filing this issue to mark this work Jan! :-)

smcvb avatar Mar 05 '19 07:03 smcvb

Yes, this is something that we should put on the roadmap. We have an issue open for this already https://github.com/AxonFramework/AxonFramework/issues/729 . Having this as a part of Axon Test module would be valuable.

idugalic avatar Mar 05 '19 09:03 idugalic