testing

Provide best-practice guidance for writing and structuring automated tests.

8|13|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/queen-of-code/AI-DLC --skill testing-queen-of-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/queen-of-code/AI-DLC/tree/main/plugins/ai-dlc-skills/skills/testing
Command: npx skills add https://github.com/queen-of-code/AI-DLC --skill testing-queen-of-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides clear, actionable testing practices and patterns to reduce regressions, catch bugs earlier, and make codebases more maintainable by improving test quality across unit, integration, and end-to-end layers.

Core Features & Use Cases

  • Test Pyramid Guidance: Recommendations for unit, integration, and E2E test balance and prioritization.
  • Unit Testing Best Practices: AAA pattern, single-responsibility tests, naming guidance, and factory/builders for test data.
  • Integration & E2E Patterns: Fixtures, DB session management, API endpoint tests, stable selectors, and CI-friendly cleanup.
  • Mocking & Stubbing Strategies: When to mock, spy patterns, avoiding over-mocking, and examples for Moq, pytest-mock, and Jest.
  • Coverage & CI Targets: Suggested coverage thresholds, anti-patterns to avoid, and running tests with coverage reporting.
  • Framework Examples: Ready guidance and templates for .NET (xUnit/NUnit), pytest, and Jest with practical snippets and test base patterns.

Quick Start

Ask the testing skill to audit your repository, identify gaps in unit/integration/E2E coverage, and provide prioritized test cases and implementation guidance.

Frequently Asked Questions about testing

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

FAQPage Schema
What is the best way to balance unit, integration, and E2E tests?

The best way to balance automated tests is following the test pyramid, prioritizing numerous fast unit tests, fewer integration tests, and minimal end-to-end flows to ensure reliable coverage without excessive execution time.

How do I write unit tests using the AAA pattern and factory builders?

Write unit tests using the AAA pattern by structuring Arrange, Act, and Assert phases clearly, utilizing single-responsibility principles, and employing factory builders for test data to improve maintainability and readability.

Does this testing guidance provide framework-specific examples for pytest and Jest?

Yes, this testing guidance provides framework-specific examples and ready templates for .NET (xUnit/NUnit), pytest, and Jest, including practical snippets, mocking strategies, and test base patterns for implementation.

When should I use mocking and stubbing strategies to avoid over-mocking?

Use mocking and stubbing strategies when isolating external dependencies, but avoid over-mocking internal logic to prevent brittle tests; apply spy patterns and framework-specific tools like Moq, pytest-mock, or Jest judiciously.

How do I fix flaky tests in CI pipelines using stable selectors and fixtures?

Fix flaky tests by implementing CI-friendly fixtures, managing DB sessions properly, and utilizing stable selectors for E2E flows to ensure deterministic execution and reliable cleanup across integration and end-to-end testing layers.