From Events to Insights: Testing and Documenting Event‑Based Software

From Events to Insights: Testing and Documenting Event‑Based Software

Event Storming fills the room with orange sticky notes. Event Sourcing records every state transition as an immutable fact. But then comes testing and suddenly all that domain clarity risks getting buried under technical ceremony.

It does not have to be this way.

In this presentation, I will show how the concepts you already know from Event Storming map directly onto a testing approach that is precise, readable, and genuinely expressive. Domain Events become fixtures and assertions. Commands become the subject under test. Hotspots become edge cases. The Given/When/Then pattern stops being a buzzword and becomes a natural fit for an architecture that already thinks in terms of past events, present commands, and expected outcomes.

But verification is only the beginning. When your tests speak the language of your domain, they can do more than pass or fail. I will demonstrate how the structured information captured during test execution can be used to automatically generate living documentation in Event Storming notation - closing the loop from collaborative modelling workshop back to the running system.

The examples are written in PHP, but the patterns and principles are architectural, not linguistic. Whether your team works in Java, C#, Go, or any other language, the insight is the same: when you align your test framework with your architecture, testing transforms from a burden into a bridge.

I most recently presented "From Events to Insights: Testing and Documenting Event‑Based Software" at the Dutch PHP Conference on in Amsterdam. Previous events include PHP UK Conference.

About me

My name is Sebastian Bergmann and I am the creator of PHPUnit, the industry-standard testing framework that has greatly improved the professionalism of PHP software development.

As founding partner of and consultant with The PHP Consulting Company (thePHP.cc), I assist teams in adopting PHPUnit, optimizing its use, refining development workflows, and writing more testable code.

More events where you can meet me are listed here.

My interactive online training courses are designed to provide you with practical knowledge that you can apply immediately. The next ones starting soon are listed here.

Upcoming events

Stay up to date with PHPUnit

You can follow @phpunit@phpc.social to stay up to date with PHPUnit's development.

You can subscribe to the PHPUnit Updates newsletter to receive updates about and tips for PHPUnit.