exp-test-smell-detection

Featured

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).

Testing & QA 6,272 stars 499 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Test Smell Detection Deep formal audit of test code using an academic test smell taxonomy. Detects symptoms of bad design or implementation decisions that make tests harder to understand, more fragile, less effective at catching bugs, or more expensive to maintain. Produces a severity-ranked report with specific locations and actionable fixes. ## Why Test Smells Matter Test smells erode confidence in a test suite and inflate maintenance costs: | Problem | Consequence | |---------|-------------| | Tests with conditional logic | Some paths never execute — hidden testing gaps | | Tests that depend on external resources | Flaky failures, slow execution, environment coupling | | Tests that sleep to wait for results | Non-deterministic timing, slow suites, false failures | | Tests without assertions | False confidence — coverage looks good but nothing is verified | | Tests that call many production methods | Hard to diagnose failures, unclear what's being tested | | Tests with magic numbers | Unreadable intent, unclear boundary conditions | | Tests relying on ToString for comparison | Brittle to formatting changes, obscure failure messages | | Tests with exception handling logic | Swallowed failures, tests that pass when they shouldn't | ## When to Use - User asks for a comprehensive or formal test smell audit - User asks "are my tests well-written?" and wants a thorough analysis - User wants a test quality health check with academic rigor - User asks for a review of test d...

Details

Author
dotnet
Repository
dotnet/skills
Created
9 months ago
Last Updated
today
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Featured

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.

6,272 Updated today
dotnet
AI & Automation Listed

code-smells

Whole-repository design-smell review — detects *wrong engineering* by name: feature envy, data clumps, primitive obsession, shotgun surgery, divergent change, speculative generality, message chains, temporal coupling, flag arguments, global/mutable data, dead code, repeated switches that want to be polymorphism — every confirmed smell from the Fowler/Beck catalog and beyond, each mapped to a specific catalog refactoring (Extract Class, Move Function, Introduce Parameter Object, Replace Conditional with Polymorphism, …). Report-first; applies the approved refactorings only when invoked with `--fix`. Use whenever the user invokes /smells, says "code smells", "design smells", "bad design", "wrong engineering", "spaghetti code", "is this well engineered", "maintainability review", "why is this codebase hard to change", "what refactorings does this need", or asks for a Fowler-style review — even if they never say the word "smell". Boundaries: bug / perf / durability findings inside named files belong to `code-audi

0 Updated 2 months ago
Stoica-Mihai
Testing & QA Listed

test-quality-analysis

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

250 Updated 2 weeks ago
secondsky