Breakdown Your Costly E2e Tests into Efficient Low Level Tests Through Hermetic Testing thumbnail

Breakdown Your Costly E2e Tests into Efficient Low Level Tests Through Hermetic Testing

End-to-end tests are really good testing solutions that provide greater confidence in the system that it tests. They are also the most commonly used form of tests when it comes to test automation. It is also pretty straightforward to get started with them. But as software systems grow and become complex, your tests also become complex. Most of all, they become… costly, very soon.

So should we ditch e2e tests altogether? 
Well not really. In my opinion, e2e tests provide a good level of smoke test coverage. You can test out your core workflows and make sure they are not affected. But they aren’t the most efficient when it comes to feedback times. Any kind of errors it might catch comes at the last point of your development workflow. Ie. after all of your services have been deployed to a dev or staging environment. By that time it is a bit too late. The unplanned work for product teams becomes tenfold. 

What's the solution then?
So instead of relying heavily on end-to-end tests, we now take a systematic approach to achieving the same level of confidence, but by taking a step down. We now try to break down our e2e tests into low-level tests. And to achieve this, we try to use the concept of hermetic testing. 

What is hermetic testing?
A hermetic test is a test that is completely self-sufficient. It is fully independent, therefore every time a test is run, you are absolutely sure that a failure is a real failure, and has nothing to do with a dependency going wrong.

In order to use hermetic testing to achieve what we want, we first split our e2e into meaningful chunks. The most common breakdown is to split it into frontend and backend systems. 

We then run our tests within the context of the front end and back end independently. We then add additional levels of tests to make sure we make up for skipping the e2e tests like contract tests, API tests, visual tests and improving existing unit testing coverage. 

Now we know what journey we went through in our organisation, in this talk I will be presenting the strategy and implementation of this concept. I will:
  • Showcase how we broke down our system into pieces 
  • Introduced different levels of testing in lower levels. 
  • Reused most of the e2e testing work we did
  • Demonstrate through real-world examples on how it can be done, step by step.  

Resources

Jaswanth_Manigundan_Hermetic_Testing_Tools (1).pdf

Comments

Sign in to comment
Explore MoT
MoTaCon 2026 image
Thu, 1 Oct
A tech conference to help you navigate the ever-shifting landscape of Quality Engineering, AI, Leadership, Product, Accessibility and Security.
MoT Foundation Certificate in Test Automation image
Unlock the essential skills to transition into Test Automation through interactive, community-driven learning, backed by industry expertise
This Week in Quality image
Debrief the week in Quality via a community radio show hosted by Simon Tomes and members of the community
Subscribe to our newsletter