test-smell-detection

Detects test smells in test code using the testsmells.org 19-smell academic catalog.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill test-smell-detection-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-smell-detection
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/test-smell-detection
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill test-smell-detection-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Test suites accumulate design flaws like conditional logic, external resource dependencies, and missing assertions that make tests fragile, slow, and misleading. This Skill performs a formal audit of test code against the academic test smell taxonomy, producing a severity-ranked report with citable smell names and concrete fixes. ## Core Features & Use Cases - Academic Smell Detection: Identifies 10 core smells (Conditional Test Logic, Mystery Guest, Sleepy Test, Assertion-Free Test, Eager Test, Magic Number Test, Sensitive Equality, Exception Handling, General Fixture, Ignored Test) plus 9 extended smells from the research literature. - Polyglot Framework Support: Covers .NET (MSTest/xUnit/NUnit/TUnit), Python (pytest/unittest), JS/TS (Jest/Vitest/Mocha), Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell Pester, and C++ via language extension files. - Calibrated Reporting: Applies calibration rules to avoid false positives on integration tests, table-driven tests, parametrized tests, and idiomatic patterns, then outputs a severity dashboard with prioritized remediation. - Use Case: Point the Skill at a flaky test project and receive a report naming each smell (e.g., Mystery Guest in OrderServiceTests.Checkout_Works), its severity, a code snippet, and a concrete fix. ## Quick Start Audit the test files in my project for test smells using the academic testsmells.org catalog and give me a severity-ranked report with fixes.

Frequently Asked Questions about test-smell-detection

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

FAQPage Schema
How do I detect test smells in my test suite?

Provide your test files or test project directory and request a formal smell audit. The Skill scans each test method against the academic catalog, calibrates for integration tests and idiomatic patterns, and returns a severity-ranked report with fixes.

What test frameworks does test smell detection support?

It supports MSTest, xUnit, NUnit, TUnit, pytest, unittest, Jest, Vitest, Mocha, JUnit, TestNG, Go testing, RSpec, Minitest, Rust, Swift XCTest, Kotest, Pester, GoogleTest, and Catch2. Language extension files supply framework-specific markers for each.

What is the difference between test-smell-detection and test-anti-patterns?

test-smell-detection performs a deep formal audit using the citable testsmells.org 19-smell academic catalog, while test-anti-patterns is a faster pragmatic review of common issues. Use this Skill only when you need research-backed smell names and rigor.

Does the audit flag integration tests for using real resources?

No. Calibration rules detect integration test markers such as category traits, tags, and naming conventions, then downgrade Mystery Guest, Eager Test, and Sleepy Test findings for those tests instead of flagging them as problems.

Why are my parametrized tests flagged as conditional test logic?

They should not be. Table-driven patterns like Go's range-over-tests loops, pytest parametrize, Jest test.each, xUnit Theory with InlineData, and Catch2 SECTIONs are explicitly excluded from Conditional Test Logic detection as canonical idioms.

When should I not use the academic test smell audit?

Avoid it for quick pragmatic reviews, writing new tests, running tests, or framework migration. It is designed only for deep formal audits where citable smell names from the research literature are required.