Mutation testing

From aj-geddes/useful-ai-prompts · View interactive version

Mutation testing is an AI agent skill from the GitHub repository aj-geddes/useful-ai-prompts. Evaluate test suite quality by introducing code mutations and verifying tests catch them. Use for mutation testing, test quality, mutant detection, Stryker, PITest, and test effectiveness analysis.

How to use this skill

Skill file

Mutation Testing

Table of Contents

Overview

Mutation testing assesses test suite quality by introducing small changes (mutations) to source code and verifying that tests fail. If tests don't catch a mutation, it indicates gaps in test coverage or test quality. This technique helps identify weak or ineffective tests.

When to Use

Quick Start

Minimal working example:

# Install Stryker
npm install --save-dev @stryker-mutator/core @stryker-mutator/jest-runner

# Initialize configuration
npx stryker init

# Run mutation testing
npx stryker run

Reference Guides

Detailed implementations in the references/ directory:

| Guide | Contents |

|---|---|

| Stryker for JavaScript/TypeScript | Stryker for JavaScript/TypeScript |

| PITest for Java | PITest for Java |

| mutmut for Python | mutmut for Python |

| Mutation Testing Reports | Mutation Testing Reports |

Best Practices

✅ DO

❌ DON'T

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.