Flipping the test pyramid

80% faster regression for a global consulting leader

Overview

A global leader in management consulting partnered with Nagarro to transform its QA strategy by flipping an inverted test pyramid. The existing automation approach relied heavily on UI-based tests, resulting in 8–10 hour regression cycles and frequent instability. By shifting to a stable API-first foundation and eliminating redundant UI validations, regression execution time was reduced by 80%, enabling faster, more reliable releases.

 

The challenge

Our QA team was responsible for ensuring software quality across a complex enterprise application used by over 20,000 active users. At such scale, even a small defect can impact hundreds of workflows. Our QA team was up against a familiar pain point: a slow, UI-heavy automation suite that took 8-10 hours to run and often broke even after minor UI changes.

Regression cycles stretched for too long and fast delivery goals seemed just out of reach. We knew the client needed a smarter, not heavier automation strategy.


Women employee showing the screen to another male employee

 


It was time to flip the pyramid.

The turning point: Rethinking the Test Pyramid

Instead of adding more UI scripts, we stepped back and revisited the Test Pyramid concept – a model that ensures:

  • More Unit and API tests
  • Fewer UI tests
  • A stable foundation that ensures speed, reliability, and maintainability

We realized that our test suite had effectively become inverted – overloaded with too many UI tests and lacking sufficient API-level validation.

 

Flipping the test pyramid Blog Illustration-02

Our approach

Instead of managing fragmented testing efforts, the focus shifted to a unified, shift-left test strategy with stronger API-level validations, a lean UI layer, and a single automation framework.

Shift-left Testing
We moved validations closer to the backend by introducing Playwright API automation for core services and backend integrations.
Lean UI Layer
We kept only the critical end-to-end UI scenarios, ensuring coverage of real user journeys without redundancy.
Unified Framework
We built a single automation framework supporting both UI and API tests, improving consistency and reducing maintenance effort.

 

 

 

Rationalizing UI automation through backend level API validation

During this transformation, we identified that we were maintaining two separate UI applications that were both calling the same backend API endpoints. Although the UI screens were different, the underlying workflows – authentication, data submission, and approval flows – were triggered through identical API calls.

Instead of validating the same logic twice through UI tests, we shifted the validations to a unified API layer. This allowed us to remove redundant UI tests, improve stability, and significantly speed up regression cycles.

 

Here’s what changed:

Removed 35% redundant UI test cases that repeated validations across the two applications.
Introduced Playwright API tests to validate the shared backend services.
Kept only business-critical user journeys in the UI, making the UI layer lean.

 

 

The impact

Metric Before After Improvement
Execution time ~ 8–10 hours ~ 1 hour 80% faster
API coverage None 50%+ New capability introduced (0 → 50%+)
UI flakiness 25–35% failure rate
~1 in 4 runs fail due to non-product issues
3–5% failure rate
Mostly genuine API defects
~85% reduction in flaky failures
Maintenance effort 20–25 hrs / sprint
Script fixes + enhancements
6–8 hrs / sprint ~65–70% effort reduction

 

 

But even more than higher speed, the biggest win was confidence.

Developers could now deploy faster, knowing the API layer had robust coverage and that the smoke testing checks had validated key user flows. 

The impact

This strategy not only saved time but also changed team’s way of working. Faster and more reliable automation ensured that every deployment reached production with confidence and minimal disruption.

  • Builds were validated earlier, catching defects before they reached the UI-layer.
  • Parallel API testing meant faster feedback loops.
  • QA evolved from a bottleneck into a delivery partner
  • Reduced manual testing effort and freed SMEs to focus on higher-value initiatives and innovation.

This success story is a reminder that quality always beats quantity and that smarter testing is always better than simply testing more.

People working in a team setting in a meeting room