assertion-quality

Analyze assertion variety and depth across .NET test suites.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/1k-off/umbraco-observability-playground --skill assertion-quality
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: assertion-quality
Source: https://github.com/1k-off/umbraco-observability-playground/tree/main/.agents/skills/assertion-quality
Command: npx skills add https://github.com/1k-off/umbraco-observability-playground --skill assertion-quality

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you detect when your .NET tests are giving false confidence by using shallow, trivial, missing, or tautological assertions instead of verifying real behavior.

Core Features & Use Cases

  • Assertion diversity auditing: Quantifies how many distinct assertion categories your tests use, and flags over-reliance on a single type (e.g., only equality).
  • Zero/trivial assertion detection: Identifies tests that make no assertions or only trivial ones like Assert.IsNotNull as the only check.
  • Quality risk finding: Flags tautological/self-referential assertions and highlights missing negative, exception, state/side-effect, or deep structural verification.
  • Framework coverage: Works across common .NET test frameworks (MSTest, xUnit, NUnit, TUnit).

Quick Start

Ask the skill to analyze your test project for assertion variety, then return a metrics report with recommendations for strengthening coverage of correctness behavior.

Frequently Asked Questions about assertion-quality

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

FAQPage Schema
How do I find missing or shallow assertions in my xUnit or NUnit test suites?

You can detect missing or shallow assertions in xUnit or NUnit test suites by analyzing assertion variety and depth across your test files. This audit identifies zero-assertion tests, trivial-only checks, and tautological patterns, producing metrics that flag missing negative, exception, or state verification for improved correctness coverage.

What are tautological or self-referential assertions in .NET unit testing?

Tautological assertions in .NET unit testing are self-referential checks that verify mock setups rather than actual system behavior, creating false confidence. Auditing your test suite identifies these quality risks alongside missing deep structural or side-effect verification, ensuring tests meaningfully validate correctness across MSTest, xUnit, NUnit, and TUnit frameworks.

How do I audit assertion diversity across a .NET test project?

To audit assertion diversity across a .NET test project, categorize assertions by framework and compute suite-wide and per-test metrics. This analysis quantifies reliance on single assertion types like equality, identifies over-concentration, and highlights missing negative or exception checks, yielding a metrics report with recommendations for strengthening behavior verification.

Does assertion quality analysis work with MSTest, xUnit, NUnit, and TUnit frameworks?

Yes, assertion quality analysis works with MSTest, xUnit, NUnit, and TUnit frameworks. The analysis categorizes assertions across all these frameworks, computing metrics to find trivial patterns, missing state checks, and tautological assertions, ensuring your test suite meaningfully verifies correctness regardless of the testing framework used.

Why do my unit tests pass but fail to verify actual system behavior?

Unit tests may pass without verifying actual behavior when they rely on shallow, trivial, or missing assertions like checking only if an object is not null. Analyzing assertion depth exposes these false-confidence patterns by flagging missing negative, exception, state, and deep structural checks across your .NET test suites.

Can this tool automatically write new assertions for my test files?

No, this tool cannot automatically write new assertions. It strictly analyzes the variety and depth of existing assertions across your test files to identify quality risks and missing checks, producing actionable recommendations and metrics rather than generating new test code or modifying your existing test suites.