assertion-quality

Analyzes assertion variety and depth across test suites in any programming language.

1|Updated Jul 27, 2026
One-click install
npx skills add https://github.com/FittyAr/Cardscape --skill assertion-quality-fittyar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: assertion-quality
Source: https://github.com/FittyAr/Cardscape/tree/main/.agents/skills/assertion-quality
Command: npx skills add https://github.com/FittyAr/Cardscape --skill assertion-quality-fittyar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Test suites often pass while verifying very little — tests with no assertions, only trivial null checks, or the same equality assertion repeated everywhere give false confidence. This Skill audits your test code to measure how varied and meaningful the assertions actually are, exposing shallow tests that let bugs slip through. ## Core Features & Use Cases - Assertion Classification: Categorizes every assertion into 12 language-neutral types (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 per-test and suite-wide metrics including average assertions per test, assertion type spread, zero-assertion tests, trivial-only tests, and self-referential/tautological assertions. - Calibrated Reporting: Applies calibration rules so exception tests, guard null checks, mock verifications, and snapshot tests are not misflagged, then produces a summary dashboard, gap analysis, and prioritized recommendations. - Use Case: Point the Skill at a freshly generated test project to find that 60% of tests use only equality assertions, three tests have no assertions at all, and error paths lack any exception verification — then get concrete suggestions for which assertion types to add where. ## Quick Start Analyze the assertion quality of all tests in my test project and report which tests are shallow, assertion-free, or lacking diversity.

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, computes metrics like assertion type spread and trivial-only tests, and flags tests that verify nothing meaningful.

How to find tests with no assertions in my test suite?▼

The analysis scans all test methods and lists each assertion-free test with its method name and apparent intent. It also detects async tests where unawaited assertions silently never execute, treating them as assertion-free.

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

Yes, the analysis is polyglot and covers .NET, Python, TypeScript/JavaScript, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, and C++. It loads a language-specific extension file first so framework-specific assertion APIs are classified correctly.

What is a trivial assertion in unit tests?▼

A trivial assertion verifies nothing meaningful, such as a lone null check or an always-true condition like Assert.IsTrue(true). A null check used as a guard before a real value assertion is not flagged as trivial.

When should I not use assertion diversity analysis?▼

Do not use it to write new tests, fix or rewrite assertions, or measure line-based code coverage. It also does not replace mutation testing or a general anti-pattern audit — it strictly evaluates assertion quality and diversity.