Targeting the layers - Test automation strategy paradigm

Why test automation strategy is so crucial

I have found that different software teams have different automation strategies and some with no automation strategy. In real practice, it is recommended to have an automation strategy for the software development team. Having a test automation strategy can help tester in the team to work together and deliver more efficiently and effectively.
I like the automation strategy shared by Richard Bradshaw in one of his public speeches. I thought to put the information as a blog post so that the piece of information is spread more.

Why not to use the test pyramid as a test automation strategy

Mike Cohn, introduced the test pyramid by conveying how different teams are doing the test automation so far in the software industry. The test pyramid was never meant to be used as a test automation strategy. Teams and companies started using test pyramid as an automation strategy, which should not be the situation.

Testability is important

Testability (the ability to test with ease) is the foundation of all the testing efforts. If teams can test the piece of software easily, they can determine the ability to automate and maintain the automated test.

While improving on the testability in the team, we should tackle the following:

  • Team - Whole team skills matrix on the aspects of contributing towards test automation.
  • Stakeholders - This is more to develop and gain the context of stakeholders’ ask for the team to automate the test? If you understand the same, then you can help them better.
  • Projects - Most often, ‌either the new coworkers or the new projects will be in a situation wherein they determine the new tools and frameworks, without going and learning about what the project is all about? It does good for no one.
  • Product - Not knowing about the product and trying to automate the tests. This is bad for testers since they gain and develop a bad experience. It is also damaging for projects and companies.
  • Technology - Since the application is a web app, that is the reason software teams should automate all the tests using Selenium. Nowadays, there are tools like react which allow you to not only automate at the UI layer but also you could have meaningful automated tests in deeper and target layers.
  • Infrastructure - Nowadays, software teams are releasing in 10 minutes. Delivering at such a faster pace, does the team have access to a different environment or pipeline? Can the tester launch a new environment and set the pipeline to run the test while matching the pace? Can new joiners get to the delivery pace, or does the team have silos?

Recommend test automation strategy for your team

Context: The Restful Booker application is built on the React framework. Here he is approaching and explaining the test strategy of a login form, which focuses on having the automated test at the targeted layer.

Gaining an understanding of how a web application works(refer to the above diagram)

  • → UI layer - The application will load the page
  • → JavaScript layer - React will build the component
  • → UI layer - The request goes back to the user to fill in the details on the login form.
  • → JavaScript layer - The details filled by the user will send an API request.
  • → API layer - The API has sent the JSON
  • → APP code - The JSON will send it to the App code to validate the credentials.
  • → DB layer - In this application, the application has used no DB, but ideally, the test should validate whether the record is in DB.
  • → APP layer - So in this context, post accepting the credentials,
  • → API layer - the request sends back the token to the API.
  • → JS layer - Now reacts to check that there is a valid token and then allows the user in the room page of the application.
  • → UI layer - The user sees the room.

How can testers implement the automated tests?

Now we have developed an understanding of how the system works.

  • Do you recommend the testers should validate valid credentials at the UI layer? I do not think so, because the system is going four layers down to do the same and they should verify in that particular layer.
  • Does the tester want to test which is the right API? Do they know which is that API? How to use it and validate whether the information is updated in the database or not?
  • Does the tester want to test that the application is rendering properly? Probably they can do that in the React layer, or even the visual testing tool is recommended.  

On the whole, we are finding the lowest point to mitigate the risk and automate the test at that ‌layer so that the test is more targeted, faster and reliable. For example, having targeted tests also helps to understand the situation where API can constantly return 200, and UI is broken. A tester in a team can approach the right person.

Breaking the myth

While following this strategy, a tester needs to constantly learn about the application since the application is improving every day. There will always be a knowledge gap in implementing the automated tests since the application is under development. This requires a good collaboration between testers and developers to have the automated test at the targeted layer. That is the reason no team can achieve 100% automated tests.


I want to end with “continuous learning is a must”. To have a meaningful automated test for the project, the team should constantly learn together.