testing-guidelines

Define test design principles for coverage, clarity, independence, and maintainability.

8|2|Updated Oct 29, 2025
One-click install
npx skills add https://github.com/cuipengfei/prompts --skill testing-guidelines-cuipengfei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-guidelines
Source: https://github.com/cuipengfei/prompts/tree/main/plugins/testing-guidelines/skills/testing-guidelines
Command: npx skills add https://github.com/cuipengfei/prompts --skill testing-guidelines-cuipengfei

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you avoid weak, brittle, and hard-to-maintain tests by enforcing clear testing principles and practical templates.

Core Features & Use Cases

  • Test design principles: Coverage for positive, negative, and boundary cases; tests that are clear, independent, and maintainable.
  • Reusable test case structure: Encourages a consistent, structured format (no tables) that improves readability and review efficiency.
  • Assertion best practices: Promotes expressive assertions, meaningful failure messages, logical assertion ordering, and proper exception testing.

Quick Start

Ask an AI to draft a full set of unit tests following the testing-guidelines rules, including structured test case steps and assertion guidance.

Frequently Asked Questions about testing-guidelines

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

FAQPage Schema
How do I design unit tests that prevent flaky code?

Design unit tests that prevent flaky code by enforcing principles of coverage, clarity, independence, and maintainability across positive, negative, and boundary scenarios using structured templates and expressive assertions.

What is the best way to structure test cases for easy review?

The best way to structure test cases for easy review is to use a consistent, readable format with logical assertion ordering and behavior-focused verification rather than brittle state checks.

How do I write meaningful assertion failure messages?

Write meaningful assertion failure messages by applying assertion best practices that promote expressive verification and clear failure outputs, ensuring your tests communicate exactly why a behavior-focused check failed.

Can I use these testing guidelines for integration test design?

Yes, you can use these testing guidelines for integration test design, as the principles of coverage, independence, and maintainability apply directly to structuring both unit and integration test cases.

Why should I test behavior and exceptions instead of checking state?

Testing behavior and exceptions instead of checking state avoids brittle tests by focusing verification on expected outcomes and proper exception handling, which ensures long-term maintainability and test independence.