Skip to content
AyoKoding

Overview

This section covers the tools that automate software testing across the pyramid — from fast unit tests to full end-to-end browser tests. Each tool includes annotated, runnable By Example tutorials.

Tools in This Section

  • Playwright - End-to-end browser automation and testing across Chromium, Firefox, and WebKit, with auto-waiting, tracing, and parallel execution. Includes both By Example and In-the-Field production guides.
  • Testing Library - User-centric component and DOM testing that queries the UI the way users do, encouraging accessible, behavior-focused tests.
  • Vitest - Fast, Vite-native unit test runner with a Jest-compatible API, watch mode, and built-in coverage.

The Testing Pyramid

These tools map onto the classic testing pyramid:

  • Unit tests (most numerous)Vitest — fast, isolated tests of individual functions and modules.
  • Component / integration testsTesting Library — verify rendered UI behavior and component interaction.
  • End-to-end tests (fewest)Playwright — exercise the whole application through a real browser.

Learning Approach

Each tool provides a By Example tutorial with annotated, runnable code:

  • Beginner - Core concepts, first tests, basic assertions
  • Intermediate - Realistic suites, fixtures, mocking, and async testing
  • Advanced - Complex scenarios, optimization, CI integration, and production patterns

Getting Started

A healthy suite uses all three: many Vitest unit tests, fewer Testing Library component tests, and a focused set of Playwright end-to-end tests.

Last updated December 28, 2025

Command Palette

Search for a command to run...