test-quality-analysis

Solid

Detect test smells, overmocking, flaky tests, and coverage issues. Analyze test effectiveness, maintainability, and reliability. Use when reviewing tests or improving test quality.

Testing & QA 162 stars 25 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
74
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Test Quality Analysis Expert knowledge for analyzing and improving test quality - detecting test smells, overmocking, insufficient coverage, and testing anti-patterns. ## Core Dimensions - **Correctness**: Tests verify the right behavior - **Reliability**: Tests are deterministic, not flaky - **Maintainability**: Tests are easy to understand - **Performance**: Tests run quickly - **Coverage**: Tests cover critical code paths - **Isolation**: Tests don't depend on external state ## Test Smells ### Overmocking **Problem**: Mocking too many dependencies makes tests fragile. ```typescript // ❌ BAD: Overmocked test('calculate total', () => { const mockAdd = vi.fn(() => 10) const mockMultiply = vi.fn(() => 20) // Testing implementation, not behavior }) // ✅ GOOD: Mock only external dependencies test('calculate order total', () => { const mockPricingAPI = vi.fn(() => ({ tax: 0.1 })) const total = calculateTotal(order, mockPricingAPI) expect(total).toBe(38) }) ``` **Detection**: More than 3-4 mocks, mocking pure functions, complex mock setup. **Fix**: Mock only I/O boundaries (APIs, databases, filesystem). ### Fragile Tests **Problem**: Tests break with unrelated code changes. ```typescript // ❌ BAD: Tests implementation details await page.locator('.form-container > div:nth-child(2) > button').click() // ✅ GOOD: Semantic selector await page.getByRole('button', { name: 'Submit' }).click() ``` ### Flaky Tests **Problem**: Tests pass or fail non-determinist...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
6 months ago
Last Updated
2 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Solid

testing-anti-patterns

Reviews test code to identify and fix common testing anti-patterns including flaky tests, over-mocking, brittle assertions, test interdependency, and hidden test logic. Flags bad patterns, explains the specific defect, and provides corrected implementations. Use when reviewing test code, debugging intermittent or unreliable test failures, or when the user mentions flaky tests, test smells, brittle tests, test isolation issues, mock overuse, slow tests, or test maintenance problems.

1,177 Updated today
rohitg00
Testing & QA Solid

analyzing-test-quality

Automatically activated when user asks about test quality, code coverage, test reliability, test maintainability, or wants to analyze their test suite. Provides framework-agnostic test quality analysis and improvement recommendations. Does NOT provide framework-specific patterns - use jest-testing or playwright-testing for those.

335 Updated today
aiskillstore
Testing & QA Solid

test-anti-patterns

Quick pragmatic review of .NET test code for anti-patterns that undermine reliability and diagnostic value. Use when asked to review tests, find test problems, check test quality, or audit tests for common mistakes. Catches assertion gaps, flakiness indicators, over-mocking, naming issues, and structural problems with actionable fixes. Use for periodic test code reviews and PR feedback. For a deep formal audit based on academic test smell taxonomy, use exp-test-smell-detection instead. Works with MSTest, xUnit, NUnit, and TUnit.

3,219 Updated today
dotnet
Testing & QA Solid

exp-test-smell-detection

Deep formal test smell audit based on academic research taxonomy (testsmells.org). Detects 19 categorized smell types — conditional logic, mystery guests, sensitive equality, eager tests, and more — with calibrated severity and research-backed remediation. Use for comprehensive test suite health assessments. For a quick pragmatic review, use test-anti-patterns instead. DO NOT USE FOR: writing new tests (use writing-mstest-tests), evaluating assertion quality specifically (use exp-assertion-quality), or finding test duplication and boilerplate (use exp-test-maintainability).

3,219 Updated today
dotnet
Testing & QA Listed

testing

Use when writing, reviewing, or improving tests, deciding what to mock, or designing interfaces for testability.

4 Updated 2 days ago
juanibiapina