exp-assertion-quality

Solid

Analyzes the variety and depth of assertions across .NET test suites. Use when the user asks to evaluate assertion quality, find shallow testing, identify tests with only trivial assertions, measure assertion coverage diversity, or audit whether tests verify different facets of correctness. Produces metrics and actionable recommendations. Works with MSTest, xUnit, NUnit, and TUnit. DO NOT USE FOR: writing new tests (use writing-mstest-tests), detecting anti-patterns (use test-anti-patterns), or fixing existing assertions.

Testing & QA 3,219 stars 238 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

# Assertion Diversity Analysis Analyze .NET test code to measure how varied and meaningful the assertions are. Produce a metrics report that reveals whether tests verify different facets of correctness — not just "output equals X" but also structure, exceptions, state transitions, side effects, and invariants. ## Why Assertion Diversity Matters Low assertion diversity signals shallow testing. Tests may pass while bugs hide in unasserted logic. Common symptoms: | Problem | Symptom | Consequence | |---------|---------|-------------| | Trivial assertions | `Assert.IsNotNull(result)` only | Test passes but doesn't verify correctness | | Single-value obsession | Always check one field or return value | Bugs in unasserted logic slip through | | No negative assertions | Never check what shouldn't happen | Regressions sneak in through false positives | | No state checks | Don't verify object state changes | Missed side-effects or lifecycle issues | | No structural checks | Only assert top-level value | Bugs in nested objects go unnoticed | | Assertion-free tests | Tests that call but don't verify | Code coverage lies; false security | ## When to Use - User asks to evaluate assertion quality or depth - User asks "are my tests actually testing anything meaningful?" - User wants to know if test assertions are too shallow or trivial - User asks for assertion coverage metrics or diversity analysis - User suspects tests give false confidence despite passing ## When Not to Use - Use...

Details

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

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Solid

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.

162 Updated 2 weeks ago
secondsky
Testing & QA Solid

exp-test-maintainability

Detects duplicate boilerplate, copy-paste tests, and structural maintainability issues across .NET test suites. Use when the user asks to reduce repetition, consolidate similar test methods, convert copy-paste tests to data-driven parameterized tests, suggest a better test structure, or identify refactoring opportunities. Identifies repeated construction, assertion patterns, copy-paste methods convertible to DataRow/Theory/TestCase, redundant setup/teardown, and shared infrastructure. Produces an analysis report with concrete before/after suggestions. Works with MSTest, xUnit, NUnit, and TUnit. DO NOT USE FOR: writing new tests (use writing-mstest-tests), reviewing test quality or anti-patterns (use test-anti-patterns), or deep mock auditing (use exp-mock-usage-analysis).

3,219 Updated today
dotnet
Testing & QA Solid

exp-dotnet-test-frameworks

Reference data for .NET test framework detection patterns, assertion APIs, skip annotations, setup/teardown methods, and common test smell indicators across MSTest, xUnit, NUnit, and TUnit. DO NOT USE directly — loaded by test analysis skills (exp-test-smell-detection, exp-assertion-quality, exp-test-maintainability, exp-test-tagging) when they need framework-specific lookup tables.

3,219 Updated today
dotnet
Testing & QA Solid

dotnet-test-frameworks

Reference data for .NET test framework detection patterns, assertion APIs, skip annotations, setup/teardown methods, and common test smell indicators across MSTest, xUnit, NUnit, and TUnit. DO NOT USE directly — loaded by test analysis skills (test-anti-patterns, exp-test-smell-detection, exp-assertion-quality, exp-test-maintainability, exp-test-tagging) when they need framework-specific lookup tables.

3,219 Updated today
dotnet
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