Wrapping Up
This chapter was less about testing than it was about test system requirements. If your library and tooling don’t make testing an event-sourced application easy, then you may want to look for a different framework.
Structuring your code so that you separate the pure functions of business logic from the dispatch, coding, and encoding work of event sourcing also makes it easy to test your applications.
Finally, you also saw that in addition to testing all of your components in isolation, you’ll want to test long flows that your application needs to support. This will surface logic bugs in the individual components or highlight problems with your expectations of flows.
Testing is one of the main reasons why people embrace event sourcing. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access