Best testing practices for Agile Teams: automated pyramids


Automated testing and agile software development often appear in pairs, but automation in agile is often easier said than done. Most developers have recognized the benefits of test automation: it speeds up testing, reduces costs, increases coverage, and so on. However, many people never exceed the initial investment required to start. Like the Neanderthals in this cartoon, many teams are in trouble. They use inefficient methods because they think they have no time to make changes. In fact, they were harmed. Don’t form this bad habit!

Best testing practices for Agile Teams: automated pyramids

Today, I share with you one of the best testing practices of agile teams.

How do I get started? How do you know which areas to focus on? Which test scenarios should be automated? In non agile software development, many people inadvertently fall into the “ice cream cone anti pattern” test, because the pattern puts more emphasis on

UI level automation. The AbstractA team prefers the model of turning the ice cream cone upside down – by Mike

Cohn promotes a popular approach, the agile test automation pyramid. It can bring the maximum benefit to the automation cost, improve the return on investment of automation, and ensure that you will get the maximum benefit from automation.

When most of our work is focused on UI level automation, the focus is to find errors; For the agile pyramid, the focus is on avoiding mistakes.

In the figure below, you can see the difference between the two methods.

Best testing practices for Agile Teams: automated pyramids

Foundation layer: unit test

Obviously, in the pyramid (as part of agile team best test practices), most of the tests should be done during the development phase, and unit tests should be done after each build. These tests are the easiest, lowest cost and fastest to complete, and are an important aspect of test driven development. Running more tests at a lower level allows us to check the corresponding work during the running process, get immediate feedback, and let the team know exactly where the errors occur when they are difficult to hide. Here, the lifetime of these errors will also be shorter, and they may occur and be cleared in less than a minute. During UI testing, errors will survive longer and generate more fierce conflicts, because they have been comfortable for a relatively long time.

Middle tier: api/ integration / component testing

After running all unit tests and passing them, you can enter the api/ integration / component testing phase. The integration test is run to ensure that all components work together. Here, most logic and business processes can be tested without UI. It is best to adopt automation here as much as possible. If you are obsessed with automation here or UI level automation, you will have fewer problems, easier maintenance, faster test execution (which means you can find errors faster and shorten their life), and you can test the logic of the system. These tests are slower and more complex than unit tests, but they are still faster and less fragile than UI tests.

Top level: UI test

Finally, UI tests are the least run. It is best to do as little UI as possible

Testing because they are expensive, difficult to prepare, difficult to maintain, and take a long time. At this step, it is only necessary to ensure that the user interface itself works properly and that all other aspects of the system have been tested. Only the most important end-to-end parts are tested. The process starts with user login and ends with final operations such as transaction success messages. Follow browser or

UI related things are also very helpful. After running UI tests, you can perform manual and exploratory tests (as shown in the sphere shape above the pyramid).

As mentioned above, the pyramid approach is a more powerful, beneficial and cost-effective way to automate testing than focusing on automated GUI testing and inadvertently following the “ice cream cone antipattern”. Pyramids provide a powerful foundation in the unit test phase, which can be used in the integration and

The UI stage is further tested, while the ice cream cone method is more top heavy and less stable.

In order to stand out in the agile development world, it is necessary to follow automated pyramid testing to produce the best quality software possible. However, it is not necessary to just follow the words of one family. Multiple references and continuous practice can be used to obtain the most suitable test method for the team.