testing-guide

Guide unit, integration, and E2E testing with Vitest and Playwright.

19|21|Updated Jul 22, 2024
One-click install
npx skills add https://github.com/vultisig/vultisig-windows --skill testing-guide-vultisig
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-guide
Source: https://github.com/vultisig/vultisig-windows/tree/main/.claude/skills/testing-guide
Command: npx skills add https://github.com/vultisig/vultisig-windows --skill testing-guide-vultisig

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a clear, actionable guide to implementing effective testing strategies, ensuring code quality and reliability across different test types.

Core Features & Use Cases

  • Test Pyramid Guidance: Understand when to use unit, integration, or E2E tests.
  • Practical Patterns: Learn best practices for Vitest, Testing Library, and Playwright.
  • Use Case: A developer unsure whether to write a unit test for a utility function or an E2E test for a critical user flow can consult this guide for clear decision-making criteria and code examples.

Quick Start

Use the testing-guide skill to understand how to write an E2E test for a user login flow.

Frequently Asked Questions about testing-guide

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

FAQPage Schema
When should I write unit tests versus integration or E2E tests?

Unit tests validate isolated utility functions, integration tests check component interactions, and E2E tests execute critical user flows. You should select the appropriate test type using decision tree criteria to balance execution speed and reliability across the test pyramid.

How do I write an E2E test for a user login flow with Playwright?

To write an E2E test for a user login flow with Playwright, you should follow practical patterns and best practices that simulate user interactions. This ensures your critical user paths are validated reliably across different test scenarios.

What are the best practices for using Vitest and Testing Library?

Best practices for Vitest and Testing Library involve implementing practical testing patterns and utilizing data factories. You should evaluate test effectiveness and adhere to specific guidelines on what not to test to maintain code quality and reliability.

What should I not test when implementing software testing strategies?

When implementing software testing strategies, you should not test implementation details or redundant framework internals. The guide specifically addresses what not to test, ensuring you focus your testing efforts on meaningful behavior and avoid brittle, low-value test suites.

How do data factories improve integration testing?

Data factories improve integration testing by providing structured, reusable test data generation patterns. They help ensure code quality and reliability by isolating test scenarios from external data dependencies, allowing consistent and predictable test evaluation.