Interview Prep/CI/CD/Testing and Quality Gates

What is the difference between unit, integration, and end-to-end tests?

BeginnerConceptTesting and Quality Gates
Answer

Unit tests check a single function or class in isolation with dependencies mocked, running in milliseconds. Integration tests check that components work together, for example the service and a real PostgreSQL container (Testcontainers). E2E tests drive the whole system through the UI or public API in a deployed environment (Playwright, Cypress, k6). Each answers a different question and catches different bugs.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Testing and Quality Gates