Beneath Every Good Test Pyramid: A Strong Oracle

Beneath Every Good Test Pyramid: A Strong Oracle

Does your test pyramid stand on oracles or sand?

While most teams are preoccupied with the shape of their test pyramid — how many unit tests, how many integration tests, and how many end-to-end tests — they overlook a fundamental point: a test pyramid is only as strong as the oracles supporting it. A test oracle is the mechanism that determines whether a test has passed or failed. Without clear, well-designed test oracles at every level, even a beautifully proportioned pyramid will crumble in the face of real-world challenges.

In this presentation, I explore how test oracles vary across the different levels of the practical testing pyramid. We will connect two perspectives: The visual metaphor of the test pyramid, which provides a guide to the number of tests at each level and the reasons for them, and the concept of test oracles, which provides a guide to what we are checking and from whose point of view.

You will leave with a practical mental model: not just how many tests belong at each level, but how to design oracles that make those tests meaningful, reliable, and truly aligned with what matters to your users and your business.

This presentation currently exists only as an idea and has not yet been accepted by a 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.