regression-testing

Guide writing Vitest unit and Playwright E2E regression tests after fixes.

Updated Feb 15, 2026
One-click install
npx skills add https://github.com/softwareByAndi/workflow --skill regression-testing-softwarebyandi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: regression-testing
Source: https://github.com/softwareByAndi/workflow/tree/main/.claude/skills/regression-testing
Command: npx skills add https://github.com/softwareByAndi/workflow --skill regression-testing-softwarebyandi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill guides developers in writing effective unit and end-to-end (E2E) regression tests to ensure code quality and prevent bugs after fixes or new feature implementations.

Core Features & Use Cases

  • Decision Framework: Helps choose between unit and E2E tests based on code characteristics.
  • Test Structure Guidance: Provides templates and best practices for writing both unit (Vitest) and E2E (Playwright) tests.
  • Helper & Fixture Usage: Details how to use provided factories, fixtures, and helper functions for efficient testing.
  • Anti-Pattern Avoidance: Highlights common mistakes to avoid, such as mocking infrastructure or using snapshots.
  • Use Case: After fixing a critical bug in the workflow execution engine, use this Skill to write a failing unit test, then ensure the fix passes it, and finally run the full test suite to confirm no other functionality was broken.

Quick Start

Use the regression-testing skill to write a new unit test for the src/shared/execution-engine.ts file.

Frequently Asked Questions about regression-testing

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

FAQPage Schema
How do I write regression tests after fixing a bug?

Use this regression testing guidance to write a failing test first, apply your fix to ensure it passes, then run the full test suite to confirm no broken functionality. This ensures the specific fix is permanently covered against future regressions.

When should I write a unit test vs an e2e test?

Choose between unit and e2e tests based on code characteristics. Unit tests via Vitest validate isolated logic, while e2e tests via Playwright verify integrated user workflows and broader system behavior after feature implementations.

What are common anti-patterns when writing Vitest or Playwright tests?

Common testing anti-patterns include mocking infrastructure and using snapshots. Avoid these by utilizing provided factories, fixtures, and helper functions to structure robust unit and e2e tests instead of relying on brittle mock setups.

How do I structure unit tests using Vitest?

Structure Vitest unit tests using provided templates and helper functions for assertions. Place test files correctly within your project structure to ensure comprehensive coverage after bug fixes without falling into anti-patterns.

Can I use Playwright for e2e regression testing?

Yes, Playwright is used for e2e regression testing. It guides agents through decision frameworks, test structure, and assertion patterns to verify integrated workflows after bug fixes or feature implementations.