Event-Based Testing

Event-Based Testing

We decompose software systems into smaller subsystems. To avoid tight coupling, one such subsystem must not tell another what to do. They should collaborate using events instead. When we can recreate the state of an application by processing the log of these events, then we have implemented Event Sourcing.

This event log also comes in handy when we test our software. Come to this presentation to learn best practices for testing software systems that use modern software architecture patterns such as Event Collaboration and Event Sourcing.

I most recently presented "Event-Based Testing" at betterCode() PHP on . Previous events include International PHP 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.

Related presentations

This presentation is part of a series in which I explore best practices for writing testable code and demonstrate effective techniques for testing it.

The common theme of "Testing with(out) dependencies", "Testable Database Interaction", and "Event-Based Testing" is the development of testable code and the effective use of test doubles to isolate dependencies in testing. Each presentation covers best practices for testing complex software architectures by demonstrating when and how to replace real dependencies with test stubs or mock objects to ensure reliable and maintainable tests.

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.