Skip to content
pubscout

mutation_test

1.8.1, released 2 months ago by an unverified publisher

Command line tool to measure test quality using mutation testing.

$ flutter pub add mutation_test
Source repository

What it does

It mutates your source code and checks whether your test suite detects the changes. By modifying code and verifying test failures, it helps you identify poorly asserted or missing tests.

AI-written summary of version 1.8.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to measure the true effectiveness of your test suite beyond simple code coverage
  • You want to run mutation testing locally or in a CI pipeline using configurable XML rules

Skip it when

  • Your project has a very large codebase and you cannot afford the time required to run extensive mutation passes
  • You are looking for a standard assertion or mocking framework rather than test quality metrics

Strengths

  • Fully configurable mutation rules and exclusions via XML documents and regular expressions
  • Supports incremental analysis in CI and optional lcov coverage integration to speed up runs
  • Generates multiple output report formats including HTML and xunit/junit

Weaknesses

  • Running a full project analysis can take a long time (hours depending on code size)
  • Mutation testing inherently requires executing test suites repeatedly, which is computationally expensive

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3

Add as a dev dependency via 'dart pub add --dev mutation_test' and run with 'dart run mutation_test'.

dart pub add --dev mutation_test
dart run mutation_test

Alternatives

Packages that do the same job and could replace mutation_test.

  • patrol_cli

    Command-line tool to run and debug Patrol UI tests on multiple platforms

  • test_api

    The user facing API for structuring Dart tests and checking expectations.

  • test_rocket

    A command-line tool to execute Dart and Flutter tests at high speed.

  • test_process

    Utility for testing subprocesses with line‑by‑line stdout/stderr streams.

Works with

Packages commonly used together with mutation_test: ones it builds on, ones built on it, and its own family.