Blog - Mr Suricate

From unit testing to E2E testing: which pyramid for your project?

Written by Mr Suricate | Jan. 13, 2026, 3:04:42 p.m.

In the world of software development, defining an effective testing strategy has become a key challenge in ensuring application quality without slowing down delivery cycles.

The test pyramid is often presented as the benchmark model for structuring this strategy, dividing efforts between unit tests, integration tests, and end-to-end tests.

On paper, this approach seems obvious. But when applied without perspective, it can quickly reveal its limitations, particularly in complex projects that are heavily front-end oriented or subject to time and budget constraints.

Poor test distribution leads to fragile, costly to maintain, and unreliable suites, which ultimately hinder teams rather than help them.

In this article, we explore how to adapt the test pyramid to your project context in order to find the right balance between speed of feedback, functional coverage, and maintainability.

 

From unit testing to E2E testing: what the pyramid explains (and what it doesn't explain)

The testing pyramid is based on three distinct levels that together form a coherent strategy. 

1. Unit tests

Unit tests examine each function or method in isolation.

Their main advantage lies in their speed of execution and their ability to precisely identify the source of a bug. When a unit test fails, you know exactly which portion of code is causing the problem.

Their maintenance costs remain low since they do not depend on any external infrastructure, which explains why they form the broadest base of the pyramid.

2. Integration tests

At the intermediate level are integration tests, which verify that your components communicate correctly with each other and with external services such as databases or third-party APIs.

A module may function perfectly in isolation but cause errors when interacting with other parts of the system. Integration tests capture precisely these failures that escape unit tests, thereby validating the overall consistency of your architecture.

3. End-to-end (E2E) testing

An E2E test replicates exactly what a user would do (log in, navigate the interface, fill out a form, validate a transaction).

This approach provides comprehensive validation of the system under conditions close to production.

However, end-to-end testing also requires specific skills to prevent it from becoming fragile and a source of false positives.

The pyramid suggests a proportion: many unit tests, an average number of integration tests, and a few E2E tests targeting critical paths.

 

 

 

 

Choosing your pyramid according to your project context

Technical architecture plays a decisive role in this equation.

For example, a traditional monolithic application generally accommodates a classic pyramid with a broad base of unit tests, while a microservices architecture will require more integration testing to validate communications between services.

Interactions between distributed components then become the key point to monitor.

Business needs also guide your priorities.

For example, an online payment system presents critical software risks for financial transactions, justifying in-depth E2E coverage for these sensitive processes. Conversely, a secondary feature that is rarely used may only require basic unit validation.

Your available resources impose real constraints. A small team with tight deadlines will need to focus its efforts on tests that offer the best value-risk ratio.

Essentially, the trade-off between speed of feedback and comprehensive coverage shapes your testing strategy. Unit tests provide immediate feedback during development, while E2E tests detect issues that only a holistic view can reveal.

Finding the right balance between these two extremes determines the effectiveness of your quality approach.

 

What role do E2E tests play today?

The classic test pyramid model is not set in stone!

Several adaptations have emerged to respond to the changing realities of modern software development.

The diamond model offers a stronger balance between unit and integration testing, recognizing that interactions between components often deserve as much attention as isolated units.

This approach is particularly relevant for service-oriented architectures where communication between modules is at the heart of business logic.

The test trophy, popularized by Kent C. Dodds, introduces a layer of static analysis at the base and places integration tests at the center of the system. This vision reflects a pragmatic reality:

  • Integration testing often offers the best confidence-to-cost ratio for modern web applications.
  • UI/visual testing plays a modest but strategic role.

Other alternative strategies have emerged depending on the context. The "crab" model heavily favors front-end testing for applications with a strong visual component, while the "ice cream cone" model completely reverses the traditional pyramid by focusing on manual and E2E testing.

These approaches are justified in certain specific environments where user experience takes precedence over comprehensive technical coverage.

 

 

Build a realistic and maintainable testing strategy

Test automation is the cornerstone of a sustainable software quality strategy, capable of adapting to constant changes in a project without blowing budgets or tying up the entire team in repetitive tasks.

The key lies in a pragmatic approach that recognizes that not all tests are equal in terms of return on investment.

Focus on essential user journeys

Focusing automation on essential user journeys through targeted E2E testing allows you to achieve relevant coverage without falling into the trap of trying to automate everything.

These critical paths, which generate the most business value or present the highest risks in the event of regression, deserve special attention.

The idea is not to multiply scenarios ad infinitum, but to intelligently select those that offer the most guarantees.

Adopt agile management of corrections

Real-time tracking of results and insights radically transforms the way teams respond to detected issues.

Rather than waiting for a complete test campaign to finish, developers receive immediate alerts allowing them to intervene quickly. This agile management of corrections significantly reduces the time between bug detection and resolution.

Taking care of automated test maintenance

The maintenance of automated tests often remains the poor relation of testing strategies, even though it determines their long-term effectiveness.

Outdated scripts generate false positives that erode team confidence and ultimately get ignored. Setting aside regular time to update tests, adapt selectors, and clean up obsolete scenarios ensures that your test suite remains an asset rather than a burden.

 

Towards a test pyramid tailored to your project 

An effective testing strategy relies above all on adapting the pyramid model to the realities of the project, rather than rigidly applying a theoretical framework. Finding the right balance between unit testing, integration testing, and E2E testing allows you to reconcile rapid feedback, functional coverage, and cost control.

Each product, each team, and each technical context involves different choices. The challenge is to maintain a clear vision of the critical paths that need to be secured and to evolve the distribution of tests according to the needs and maturity of the project.

In this approach, Mr Suricate is an effective tool for automating key user journeys and monitoring application behavior in real time. This continuous visibility makes it easier to adjust the testing strategy and helps maintain a consistent level of software quality over time.