assertion-quality

Installation
SKILL.md

Assertion Diversity Analysis

Analyze test code in any supported language 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.

Language-specific guidance: Call the test-analysis-extensions skill to discover available extension files, then read the file matching the target codebase's language and framework (e.g., dotnet.md for .NET, python.md for pytest, typescript.md for Jest, go.md for the standard testing package). You MUST read the relevant extension file before classifying assertions, because assertion APIs differ significantly across frameworks.

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 Test contains only Assert.IsNotNull(result) / assert result is not None / expect(x).toBeDefined() 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
Installs
281
Repository
dotnet/skills
GitHub Stars
3.5K
First Seen
May 11, 2026
assertion-quality — dotnet/skills