assertion-quality

Analyzes assertion diversity and depth across test suites in any language.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/ecoDriverltd/FoundryAgentsExperiment --skill assertion-quality-ecodriverltd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: assertion-quality
Source: https://github.com/ecoDriverltd/FoundryAgentsExperiment/tree/main/.agents/skills/assertion-quality
Command: npx skills add https://github.com/ecoDriverltd/FoundryAgentsExperiment --skill assertion-quality-ecodriverltd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Test suites often pass while verifying very little — tests may contain no assertions, only trivial null checks, or tautological self-referential assertions, giving false confidence that the code is correct. This Skill audits test code to measure how varied and meaningful the assertions actually are. ## Core Features & Use Cases - Assertion Classification: Classifies every assertion into 12 language-neutral categories (equality, exception, negative, state/side-effect, structural/deep, and more) across .NET, Python, TypeScript/JavaScript, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, and C++. - Diversity Metrics: Computes suite-wide metrics including average assertions per test, assertion type spread, zero-assertion tests, trivial-only tests, and self-referential/tautological assertion detection. - Gap Analysis & Recommendations: Maps untested behaviors against production code and produces a prioritized report with concrete suggestions for specific test methods. - Use Case: Point the Skill at a pytest or MSTest project and ask whether the tests actually verify meaningful behavior — it returns a summary dashboard, category breakdown, and a list of assertion-free tests to fix. ## Quick Start Analyze the assertion quality of the tests in my test project and tell me which tests are shallow or missing assertions.

Frequently Asked Questions about assertion-quality

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

FAQPage Schema
How do I check if my tests have meaningful assertions?▼

Run an assertion diversity analysis over your test files. The Skill classifies every assertion into 12 categories, flags tests with zero or only trivial assertions, and reports a summary dashboard showing assertion type spread and per-test counts.

What is a self-referential or tautological assertion in tests?▼

A tautological assertion compares an input to a round-tripped version of itself, such as Assert.AreEqual(input, Parse(input.ToString())), verifying plumbing rather than behavior. The analysis flags these separately from normal equality assertions and reports their percentage.

Does assertion analysis work with pytest, Jest, and Go tests?▼

Yes, the analysis is polyglot and supports pytest, Jest/Vitest, Go testing, MSTest, xUnit, JUnit, Rust, Ruby, Swift, Kotlin, PowerShell, and C++. It loads a language-specific extension file first so framework-specific assertion APIs are classified correctly.

Are exception-only tests penalized for low assertion counts?▼

No, exception assertions like pytest.raises or Assert.ThrowsException are treated as complete on their own. Calibration rules also exclude guard null checks before real assertions and meaningful boolean property checks from being flagged as trivial.

When should I not use assertion diversity analysis?▼

Do not use it to write new tests, measure line coverage, or detect general anti-patterns like flakiness and duplication. It also does not perform mutation testing to check whether tests would catch injected bugs; use a test gap analysis approach for that.