assertion-quality

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

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/adinj00/player-performance --skill assertion-quality-adinj00
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: assertion-quality
Source: https://github.com/adinj00/player-performance/tree/main/.agents/skills/assertion-quality
Command: npx skills add https://github.com/adinj00/player-performance --skill assertion-quality-adinj00

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 assertion quality so you can see whether tests actually verify different facets of behavior. ## Core Features & Use Cases - Assertion Classification: Classifies every assertion into 12 language-neutral categories (equality, exception, negative, state/side-effect, structural, 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 such as 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, and mock verifications are not misflagged, then produces a summary dashboard, gap analysis, and prioritized recommendations. - Use Case: Point it at a pytest or MSTest project and ask whether the tests are meaningful; it returns which tests are assertion-free, which are shallow, and concrete assertions to add. ## Quick Start Analyze the assertion quality of the tests in my test project and tell me which tests are shallow or assertion-free.

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 on your test files. It classifies every assertion into categories like equality, exception, negative, and state checks, then reports which tests have zero assertions, only trivial null checks, or low category diversity.

What is a trivial assertion in unit tests?

A trivial assertion verifies nothing meaningful, such as Assert.IsNotNull(result), assert result is not None, or expect(x).toBeDefined() used alone. A null check followed by a real value assertion is a legitimate guard, not trivial.

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

Yes, the analysis is polyglot and covers pytest, Jest, Go testing, MSTest, xUnit, JUnit, RSpec, Rust, Kotlin, and more. It loads a language-specific extension file first so framework-specific assertion APIs are classified correctly.

Are mock verifications counted as real assertions?

Yes, mock-call verifications like verify(mock).method(), expect(mock).toHaveBeenCalledWith(), and mock_method.assert_called_with() count as State/Side-effect assertions. Tests using them are not flagged as assertion-free.

When should I not use assertion quality analysis?

Do not use it to write new tests, fix or rewrite assertions, measure line coverage, or run a general anti-pattern audit. It only evaluates the variety and depth of existing assertions, not mutation effectiveness or code coverage.