Contents
Mr Brij Blog

Understanding Automation Test Layers
   Nov 21, 2021     3 min read     - Comments

We can not test everything and we should not try to test everything documented on UI Automation Test layer. There are varieties of test layers are available where documented tests can be divided. This will help us reduce execution and and increase fast feedback with positive side effect of shift left.

The Balancing Act

Each activity and task in a project have cost, and it should also be associated to some business value. Testing is not an exception and unnecessary testing taks acn causes unnecessary delays and ends up incurring more costs. Also, there should not be incomplete or too less testing otherwise, there may be a chance of defective products to be handed to the end users. Therefore, software testing should be done appropriately.

Screenshot 2022-05-06 at 4 56 04 PM

Triple constraint – the balancing act that occurs between cost, quality and time – is a term often heard in the world of project management. Quality Analyst should ensure that they successfully manage the scope of quality practices to keep it within the cost and time parameters set by stakeholders.

Cost of Defect

Cost of fixing a defect is exponentially proposnate to time taken for it to get discovered and Teams decision to act on it. Earler we find the defect lower the cost would be to fix it. In below graph we can understand that as Qaulity analyst we need to be shifted left and perform our quality checks to find defects as early as possible.

Screenshot 2022-05-06 at 5 02 50 PM

Test Pyramid

Test Pyramid concept is best way to achieve shift left for Quality checks. It would also shift our mindset to defect prevension instead of defect identification.

Screenshot 2022-05-06 at 5 12 54 PM

We need to colaborate with app devs to understand the level of contribution we can make to ensure good test coverage in lower layers of test pyramid. That will help us reduce tests on higher layer that are too costly and usualy come with flakyness.

Lets try and understand what can be covered on individual test layers of test Pyramid.

Screenshot 2022-05-06 at 5 13 55 PM

  • Functional, cross-functional, UI/JS classes (model, controller, view)
  • Boundary values and edge cases
  • Immediate feedback
  • Safety net
  • Lowest cost of implementation

Screenshot 2022-05-06 at 5 13 50 PM

  • Integration points
  • API Contract tests
  • API compatibility
  • Regressive data validations
  • dB interactions
  • Service-level feedback on interactions

Screenshot 2022-05-06 at 5 13 35 PM

  • Regressive end-to-end tests
  • Functional/Cross-functional tests
  • Feedback on functional interactions

Screenshot 2022-05-06 at 5 13 29 PM

  • End-to-end user journeys
  • Tests UI interactions on browsers
  • Tests from user’s point of view

Feature of an effective automation suite

  • Robustness
  • Speed/Feedback cycle
  • Debugging/Faster analysis of execution
  • Maintainability
  • Proneness to error

Implemetation of test pyramid help us achieve most of the above stated features of an effective autimation suite.

What do you think ? let me know your thought.

happy testing :)