Mutation Test Runner for Openclaw

A sophisticated testing tool that injects code mutations to measure the actual effectiveness of your test suite beyond simple line coverage.

charlie-morrison
v1.0.1
May 1, 2026
0
692
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install mutation-test-runner

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install mutation-test-runner using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Mutation Test Runner?

The Mutation Test Runner is an essential addition to Openclaw Skills designed to solve the problem of deceptive test coverage. While traditional line coverage measures which lines were executed, it cannot verify if your tests actually validate logic. This skill injects purposeful defects (mutants) into your source code—such as flipping boolean logic or removing function calls—to see if your existing tests fail as they should.

By providing a definitive mutation score, this tool helps developers identify weak assertions and untested logic paths. It transforms testing from a check-box exercise into a rigorous quality assurance process, ensuring that if a bug is introduced in the future, your test suite will reliably catch it.

Mutation Test Runner Use Cases

  • Evaluating if high line coverage is actually catching logic errors and boundary bugs.
  • Identifying missing assertions in unit tests where code is executed but not verified.
  • Improving the robustness of critical business logic in financial or security-sensitive modules.
  • Benchmarking test suite quality over time as a project scales.
  • Automating the generation of missing test cases based on surviving mutants.

How Mutation Test Runner Works

  1. The skill detects the project language and framework (Node.js, Python, Java, Go, or Rust).
  2. It identifies or installs the appropriate mutation engine like Stryker, mutmut, or PIT.
  3. It systematically applies mutation operators (e.g., changing > to >=) to the source code.
  4. The test suite is executed against each mutated version of the code.
  5. The runner analyzes whether the tests passed (mutant survived) or failed (mutant killed).
  6. A comprehensive report is generated with a mutation score and specific recommendations for new tests.

Mutation Test Runner Setup

To get started with this Openclaw Skills extension, ensure you have your project environment active. The runner will automatically attempt to use native tools:

# For JavaScript/TypeScript
npm install --save-dev @stryker-mutator/core

# For Python
pip install mutmut

# For Java (Maven)
mvn org.pitest:pitest-maven:mutationCoverage

Mutation Test Runner Data Schema & Taxonomy

The Mutation Test Runner organizes its analysis into a structured format for easy review:

Data Point Description Format
Mutation Score The percentage of mutants caught by tests Percentage (%)
Mutant Status Classified as Killed, Survived, or Timed Out Status Label
File Metrics Score breakdown per individual source file Markdown Table
Recommendations Specific test cases needed to kill surviving mutants Code Snippets
Baseline Historical data used for CI/CD gating JSON/Markdown

Mutation Test Runner Advanced Features

  • Manual Mutation Fallback: Implements a sed-based mutation workflow for languages without dedicated tools.
  • Automated Test Suggestion: Generates specific test code (e.g., Jest or Pytest) designed to target and kill surviving mutants.
  • CI/CD Gating: Set a 'baseline' mutation score that prevents merging code if test quality drops.
  • Boundary Analysis: Specialized mutation operators focusing on off-by-one errors and edge case logic.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*