Def Method

Def Method Blog

The thoughts and ponderings of the team @defmethodinc

The Agile Testing Pyramid


The test pyramid concept comes up a lot in the agile development world. It is a way to think about the different types of tests developers should be using in their testing portfolio for their products.   

At the base of the testing pyramid is unit testing. Unit testing is the foundation of a solid test automation strategy. We tend to think of unit testing as being more defined by having a small scope, fast execution time, and nearness to development. The benefit of dealing with a small scope means that when a unit test fails there is a limited problem space to explore, which helps accelerate troubleshooting. This saves developers time in figuring out what went wrong, and gives them more time to focus on fixing things.

The service layer is at the middle of the testing pyramid. Testing of this layer includes using the service layer or the API layer or component layer interfaces. The tests are testing multiple elements of the system at the same time. There are more of these tests than there are of the UI tests.

The UI layer, also known as the end-to-end layer or system testing layer, requires testing of the whole system through the user interface or another external interface. This layer of testing tests the entire functionality of the system at once, and represents what the user would experience or what the system as a whole would experience. These tests are easy to break if the code changes, especially when they have to simulate UI actions. They can be difficult to write and can also take some time to run. They offer benefit in the sense that they are the second testing line of defense. The developer can spot functional errors in the code base that may expose missing or incorrect unit tests. 

At Def Method:


At Def Method we believe in the philosophy to always be building tests using all three lines of defense from the testing pyramid. Our goal is to make a product that works long after we have rolled off of a project.  We always write tests first and focus on solid and stable build of our code.  This both prevents regressions and informs better design as we build your product. 


This ensures that you are always in control of how the project is progressing.  As partners on the product, staging environments allows us to prove our new code and discover any unforeseen bugs before pushing any new code to your customer facing product.  Our goal is to make releasing to production a business decision.  

Def MethodComment