How to Execute an Agile Testing Pyramid With Automation

Lucia Cavero-Baptista

Automation Expert

Test automation has become a key enabler of agile development, so it is no surprise that an Agile Testing Pyramid requires automation in order to succeed as an approach.

Michael Cohn’s Agile Testing Pyramid became known to the world in 2009 after he published his book, Succeeding with Agile. The pyramid is a visual representation of the ideal testing distribution of testing a team should follow.


The good thing about the agile testing pyramid is that the logic behind it is timeless and can be applied to any type of software. So you shouldn’t obsess over the ambiguous terms used by Cohn.

Some people might use different terms or percentages for each of these stages, but the most important thing is finding the terms that work for you and your team while keeping the pyramid’s structure. 

So how do we execute on each of the pyramid’s layers? Here’s a breakdown of each of the testing categories:

Unit tests

Unit tests corroborate that each individual piece of code that makes up the software is working as intended. This type of testing isolates parts of the system under test (SUT) that don’t have any external dependencies to validate the functionality of each individual part. 

This is usually referred to as white-box testing,  meaning that the tester knows the internal workings and implementation details. 

The idea here is to first test each individual feature at a code level so that we can find bugs as close to the root cause as possible. These tests are most commonly done by developers themselves.

Test-Driven Development (TDD) is a good agile methodology to use in unit testing. It forces the team to translate requirements into test cases before writing any code, therefore making the code simpler and bug-free.

Integration Tests

Integration tests ensure that all the interactions between the units of code, as well as with external components, are functioning as intended. By carrying out integration tests we guarantee that the software is communicating properly with external databases, REST APIs, and the like.

This is considered black-box testing because you’re testing the communication between two parts without taking into consideration the inner workings of each of them, like a user. The tester, in this case, supplies input and examines output.

End-to-end tests

End-to-end tests focus on testing a process from end-to-end, generally from the perspective of the end-user. For that reason, the black-box method is also used here.

Despite doing all we can to minimize the risk of bugs in the previous two levels of the pyramid, the truth is, end-to-end tests will probably still encounter problems in software. Even if we try to reproduce as many user interactions as we possibly can, a single end-user can make the whole system crash in minutes, even after unit, integration, and performance tests have passed.

Related Reading: How to do End-to-end Testing in Agile Teams

Luckily, regression testing, when performed frequently, is a very effective method of discovering these bugs as quickly as possible. If you want to make sure that you ate set up to minimize the risk of bugs, read our blog post: How to Automate Regression Testing (Codeless)

Generally, end-to-end tests span across multiple touch-points and technologies, such as web, desktop, or mobile. This means that this type of testing can be complex and lengthy when performed manually. 

If we were to perform these tests manually, we would fall under the traditional or inverted pyramid approach. However, when automating the execution of these tests, we’re able to comply with Cohen’s Agile Pyramid because we now spend only a fraction of the time conducting these tests, and with much better results. 

What are the benefits of a Test Automation Pyramid?

The Test Automation Pyramid offers an agile approach to testing that decreases time to market, the risk of bugs, and siloed software development. It allows organizations to fail fast, and produce higher quality software as a result. In sum, the key benefits are:

  • A clear progression and logic to software testing and software development
  • Reduces the time in bug detection
  • Decreases time to market by streamlining the testing process
  • Allows for better collaboration between development and QA teams

Benefits Test Automation Pyramid

But a test automation pyramid methodology is only as good as the automation tool you use. If test automation takes longer to set up, execute and maintain than performing tests manually, then you’re not doing any better than with the Inverted Testing Pyramid methodology.

Not all tools are made equal. Some require coding skills, while others offer low-code or full no-code capabilities. Your choice will depend on your available resources and their level of technical knowledge.

On top of that, not all tools work across technologies, so if you’re hoping to automate end-to-end testing of processes that run across technologies, the tool you choose should have the capability. 

Test Automation Tool Technologies Supported

No-code Automation for the Test Automation Pyramid

Leapwork is a no-code test automation tool that facilitates agile delivery pipelines that use the Test Automation Pyramid methodology. Leapwork allows business users and QA teams to build automation through the use of flowcharts rather than code.

Moreover, it supports end-to-end testing across complex IT environments, allowing you to perform the top layer of the Agile Testing Pyramid as quickly and efficiently as possible.

Are you looking for the right agile test automation tool for your team? Download the whitepaper below to learn about the common pitfalls in automation testing and discover how to find the right agile automation tool to kick off your agile development that fosters collaboration, seamlessly integrates with your existing software infrastructure, and minimizes maintenance to shorten release cycles.

New call-to-action