Productboard Technology RadarProductboard Technology Radar

Testing pyramid

Adopt

The Testing Pyramid is a guide to help us create a balanced testing strategy:

  • Unit Tests form the base and test the smallest parts of the code, such as functions or classes, to check if they work right by themselves. We aim to cover at least 60% of the new code with unit tests.
  • Integration Tests come next and check if different parts of the system work well together.
  • Component Tests are a step up and test individual parts or services for correct behavior, more extensively than unit tests but not as broadly as end-to-end tests.
  • End-to-End Tests are at the top of the pyramid and ensure that the entire application works as expected in real-world scenarios.

The Big Idea: More tests at the bottom (Unit Tests) and fewer as we move up (End-to-End Tests) create a stable and efficient testing process that helps us catch more issues early and ensures the software works well as a whole.

Testing Tools by Stack

JVM/Kotlin Stack

  • JUnit - Testing framework foundation
  • Mockito - Mocking framework for unit tests
  • AssertJ - Fluent assertions library
  • Testcontainers - Integration testing with real dependencies

Ruby Stack

  • RSpec - Behavior-driven testing framework
  • Factory Bot - Test data generation

Frontend Stack

  • Jest - JavaScript testing framework
  • React Testing Library - Component testing utilities
  • Cypress - End-to-end testing framework

📚 Resources