Testing Pyramid

Overview

A testing pyramid is a pyramid where all the different types of tests fit. It’s also referred to as the test automation pyramid, lays out the types of tests that should be included in an automated test suite. It also outlines the sequence and frequency of these tests. The whole point is to offer immediate feedback to ensure that code changes do not disrupt existing features.

Advantages of Testing Pyramid

  • Agile processes emphasize speed and efficacy.

  • The pyramid provides testers with the right priorities.

  • It can also be helpful in building a more reliable test suite.

pyramid+test.jpg

This test automation pyramid operates at three levels:

  1. Unit tests

  2. Integration tests

  3. End-to-End tests


  • At the bottom, is Unit Tests. These should count for the majority of tests you have for your codebase. They test individual components or functionalities to validate that it works as expected in isolated conditions. They tests the smallest unit of code possible.

  • Middle level consists of Integration Tests which are tests designed to verify the integration of different parts of separate components of a software system together. These components can range from databases, external services (APIs) and the like. Whether it is a call to a database or web service, the software needs to communicate effectively and retrieve the right information to function as expected.

  • At the top of the pyramid are the end-to-end tests. These ensure that the entire application is functioning as required. End-to-end tests do exactly what the name suggests: test that the application is working flawlessly from start to finish.

Reference

define-testing-strategy-using-the-testing-pyramid

testing-pyramid-for-test-automation

levels-of-testing

Previous
Previous

SendGrid With Ruby on Rails

Next
Next

Automatic deploy to AWS with Github Actions