Add exp-test-smell-detection skill and evaluation - #491
Conversation
- Language-agnostic core skill detecting 10 test smells (conditional logic, mystery guest, sleepy test, assertion-free, eager test, magic numbers, sensitive equality, exception handling, general fixture, ignored tests) - .NET extension with framework-specific detection tables (MSTest/xUnit/NUnit/TUnit) - Reference catalog with 19 smells from testsmells.org research - Evaluation with 4 scenarios: smelly suite, clean suite, integration tests, non-activation - CODEOWNERS entry for @dotnet/dotnet-testing
- Add real smells to integration test fixture (Thread.Sleep, conditional logic, assertion-free test) mixed with legitimate integration patterns - Update rubric to test nuanced distinction between real smells and acceptable integration test patterns - Increase non-activation scenario timeout from 120s to 300s to prevent timeout-related scoring penalties
|
/evaluate |
Skill Validation Results
[1] Model: claude-opus-4.6 | Judge: claude-opus-4.6 🔍 Full Results - additional metrics and failure investigation steps |
|
/evaluate |
Skill Validation Results
[1] Model: claude-opus-4.6 | Judge: claude-opus-4.6 🔍 Full Results - additional metrics and failure investigation steps |
There was a problem hiding this comment.
Pull request overview
Adds a new dotnet-experimental skill (exp-test-smell-detection) with supporting .NET-specific guidance, reference material, and a dedicated evaluation suite + fixtures to validate smell detection vs. false positives (including integration-test calibration and non-activation behavior).
Changes:
- Introduces the new skill definition (
SKILL.md) plus a .NET detection extension and an extended reference catalog. - Adds evaluation scenarios (
eval.yaml) and MSTest fixture projects covering “smelly”, “clean”, “integration”, and non-activation prompts. - Updates repo plumbing for the new content (CODEOWNERS + known-domains entry for
testsmells.org).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/dotnet-experimental/exp-test-smell-detection/fixtures/smelly-tests/OrderService.Tests/OrderService.Tests.csproj | Adds MSTest project fixture for the “smelly suite” scenario. |
| tests/dotnet-experimental/exp-test-smell-detection/fixtures/smelly-tests/OrderService.Tests/OrderProcessorTests.cs | Adds intentionally smelly unit tests used to validate smell detection outputs. |
| tests/dotnet-experimental/exp-test-smell-detection/fixtures/integration-tests/DataAccess.IntegrationTests/DataAccess.IntegrationTests.csproj | Adds MSTest project fixture for integration-test calibration scenario. |
| tests/dotnet-experimental/exp-test-smell-detection/fixtures/integration-tests/DataAccess.IntegrationTests/UserRepositoryIntegrationTests.cs | Adds integration-test fixture mixing legitimate patterns with intentional smells. |
| tests/dotnet-experimental/exp-test-smell-detection/fixtures/clean-tests/Calculator.Tests/Calculator.Tests.csproj | Adds MSTest project fixture for the “clean suite” scenario. |
| tests/dotnet-experimental/exp-test-smell-detection/fixtures/clean-tests/Calculator.Tests/ScientificCalculatorTests.cs | Adds a clean test suite fixture to ensure the skill doesn’t invent smells. |
| tests/dotnet-experimental/exp-test-smell-detection/eval.yaml | Adds 4 evaluation scenarios to validate activation and correct smell detection/calibration. |
| plugins/dotnet-experimental/skills/exp-test-smell-detection/SKILL.md | Defines the smell taxonomy, workflow, calibration rules, and reporting structure. |
| plugins/dotnet-experimental/skills/exp-test-smell-detection/extensions/dotnet.md | Documents .NET framework markers and detection patterns used by the skill. |
| plugins/dotnet-experimental/skills/exp-test-smell-detection/references/test-smell-catalog.md | Adds extended smell catalog/reference background beyond the core 10 smells. |
| eng/known-domains.txt | Allows linking to testsmells.org in skill/reference content. |
| .github/CODEOWNERS | Adds ownership entries for the new skill + its tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* Add exp-test-smell-detection skill and evaluation - Language-agnostic core skill detecting 10 test smells (conditional logic, mystery guest, sleepy test, assertion-free, eager test, magic numbers, sensitive equality, exception handling, general fixture, ignored tests) - .NET extension with framework-specific detection tables (MSTest/xUnit/NUnit/TUnit) - Reference catalog with 19 smells from testsmells.org research - Evaluation with 4 scenarios: smelly suite, clean suite, integration tests, non-activation - CODEOWNERS entry for @dotnet/dotnet-testing * Improve integration test fixture and non-activation timeout - Add real smells to integration test fixture (Thread.Sleep, conditional logic, assertion-free test) mixed with legitimate integration patterns - Update rubric to test nuanced distinction between real smells and acceptable integration test patterns - Increase non-activation scenario timeout from 120s to 300s to prevent timeout-related scoring penalties * Fix test projects * Add domains for testsmells * Remove extra domains
Adds a new experimental skill that detects test smells — bad programming practices in test code that reduce effectiveness and increase maintenance cost.
Skill design
The skill is structured in three layers:
Key calibration rules prevent false positives: integration tests aren't penalized for database usage, foreach-assert loops aren't flagged as conditional logic, contextually obvious count assertions aren't flagged as magic numbers.
Evaluation
4 scenarios with MSTest 4.1.0 fixtures:
Based on
Smell taxonomy from testsmells.org (Peruma et al., ESEC/FSE 2020), severity thresholds from Spadini et al. (MSR 2020), and testing philosophy from Google's SWE Book (Chapter 11).