testing

Develop unit, integration, and end-to-end testing strategies with a QA playbook.

Updated May 15, 2021
One-click install
npx skills add https://github.com/JustinFirsching/dotfiles --skill testing-justinfirsching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/JustinFirsching/dotfiles/tree/main/opencode/.config/opencode/skill/testing
Command: npx skills add https://github.com/JustinFirsching/dotfiles --skill testing-justinfirsching

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to designing and maintaining unit, integration, and end-to-end tests, helping teams ensure code quality and minimize regressions.

Core Features & Use Cases

  • Unit Tests: guidance on testing individual functions with mocks, fast feedback, and high coverage.
  • Integration Tests: strategies for validating interactions between components with realistic dependencies.
  • End-to-End (E2E) Tests: patterns for validating complete user workflows in realistic environments.
  • Use Case: apply the pyramid to a new feature to balance test coverage and execution time.

Quick Start

Run the full test suite in the order unit, integration, then end-to-end to validate the codebase.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I structure a test pyramid for unit, integration, and e2e tests?

A test pyramid balances unit, integration, and end-to-end tests by weighting coverage toward fast unit tests with mocks, fewer integration tests for component interactions, and minimal e2e tests for complete user workflows.

What's the best way to isolate dependencies when writing unit tests?

Isolate dependencies in unit tests by applying dependable mocking practices that replace external components, ensuring fast feedback and high coverage for individual functions without triggering real network or database calls.

Does this testing approach work with pytest, vitest, and Go frameworks?

Yes, this testing approach provides framework patterns and guidelines specifically for pytest, vitest, and Go, covering test structure, labeling, and mock strategies across different languages.

How do I fix flaky tests in an async testing environment?

Fix flaky tests in async environments by applying specific guidelines for async testing and flaky test management, ensuring consistent isolation and dependable execution across your software projects.

When should I use integration tests instead of unit tests?

Use integration tests instead of unit tests when you need to validate interactions between components with realistic dependencies, whereas unit tests focus on individual functions with mocks for fast feedback.