mutation-verify-render-tests

Verify renderer pixel tests detect missing visual output via mutation testing.

Updated Nov 18, 2025
One-click install
npx skills add https://github.com/cajias/claude-skills --skill mutation-verify-render-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mutation-verify-render-tests
Source: https://github.com/cajias/claude-skills/tree/main/plugins/testing/skills/mutation-verify-render-tests
Command: npx skills add https://github.com/cajias/claude-skills --skill mutation-verify-render-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scene-capture and pixel-based renderer tests can look reassuring while still being hollow, because they may pass even when the feature they are meant to verify is missing, broken, or being satisfied by unrelated pixels.

Core Features & Use Cases

  • Mutation Verification: Temporarily remove or stub the render call for a feature and confirm the corresponding test fails.
  • False-Positive Detection: Detect tests that are accidentally satisfied by backgrounds, HUD elements, anti-aliasing, or neighboring UI.
  • Render Test Hardening: Tighten weak image assertions by narrowing regions, using feature-specific color predicates, and requiring meaningful pixel counts.
  • Use Case: Before trusting a headless screenshot test for a game HUD, sprite, or chart, break the renderer once and verify the test goes red, then restore it and verify it goes green again.

Quick Start

Ask the skill to help you mutation-test a scene-capture assertion by stubbing the renderer for the feature under test and checking that the test fails and then passes again after restoration.

Frequently Asked Questions about mutation-verify-render-tests

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

FAQPage Schema
Why do my scene-capture and pixel tests pass when the rendering feature is broken?

Scene-capture and pixel tests can produce false positives when unrelated pixels, backgrounds, or HUD elements accidentally satisfy weak image assertions, causing them to pass even when the target feature is missing or broken.

How do I verify that a headless renderer test actually detects missing visual output?

You can verify a headless renderer test by using mutation testing to temporarily stub or remove the draw call for the feature under test, confirming the test fails, then restoring it to confirm the test passes again.

How can I tighten weak image assertions to prevent false positives in pygame or canvas test suites?

Tighten weak image assertions by narrowing capture regions, applying feature-specific color predicates, and requiring meaningful pixel counts to ensure tests fail when broken and only pass when the target feature renders correctly.

Does mutation testing work with matplotlib and buffer-based screenshot tests?

Yes, mutation testing applies to headless graphics test suites including matplotlib, pygame, canvas, and other buffer-based rendering checks to validate that pixel and scene-capture assertions fail when draw calls are broken.

What is the best way to harden headless screenshot tests before trusting them for game HUD or chart rendering?

The best way to harden headless screenshot tests is to break the renderer once by stubbing the draw call, verify the test goes red, then restore the renderer and verify the test goes green again before trusting the assertion.