testing-best-practices

Select Playwright, Integration, or Unit tests for UI, API, and logic verification.

20|3|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/andrelandgraf/fullstackrecipes --skill testing-best-practices-andrelandgraf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-best-practices
Source: https://github.com/andrelandgraf/fullstackrecipes/tree/main/templates/fullstackrecipe/.agents/skills/testing-best-practices
Command: npx skills add https://github.com/andrelandgraf/fullstackrecipes --skill testing-best-practices-andrelandgraf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tests are often misapplied or inconsistently implemented, leading to flaky or insufficient coverage.

Core Features & Use Cases

  • Guided test-type selection: choose Playwright, Integration, or Unit based on UI, API, or pure logic needs.
  • Data isolation guidance: ensures isolated test data per suite and disposable Neon branches.
  • Deployment-ready patterns: aligns with feature work, debugging, and branch-based experimentation.

Quick Start

Run the appropriate test command: bun run test for all tests, bun run test:playwright for browser tests, bun run test:integration for API tests, or bun run test:unit for unit tests.

Frequently Asked Questions about testing-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between Playwright, integration, and unit tests for feature verification?

Test-type selection depends on the target layer: Playwright verifies UI browser interactions, integration tests validate API endpoints, and unit tests check isolated logic. Applying the right test type ensures stable feature verification across all application layers.

What is the best way to isolate test data when running integration and Playwright tests?

Isolate test data by using disposable Neon branches for each test suite. This approach aligns with branch-based experimentation and deployment-ready patterns, preventing data conflicts and ensuring tests run in isolated environments.

When should I use unit tests instead of integration tests during feature development?

Use unit tests for isolated pure logic verification, and switch to integration tests when validating API layer interactions. Applying the correct test type during feature development prevents misapplied tests and insufficient code coverage.

Does this testing strategy work with bun for running Playwright and integration tests?

Yes, the strategy uses bun commands for execution. Run bun run test:playwright for browser tests, bun run test:integration for API tests, or bun run test:unit for isolated logic tests to verify features across all layers.

Why does my test suite have flaky coverage and insufficient feature verification?

Flaky or insufficient test coverage typically occurs when tests are misapplied or inconsistently implemented. Using guided test-type selection criteria for Playwright, integration, and unit tests ensures reliable verification and eliminates flakiness.