← All projects
Project record1 mention
Originally shared on Hacker News

cargo-test-prune

A Rust tool that uses mutation testing (via cargo-mutants) and a greedy set cover solution to suggest which tests can be pruned when tests overlap or are redundant.

Last shared
01 / The problem

What it addresses

Tests tend to accumulate monotonically, especially when coding with AI, and the author wanted a countermeasure to eliminate unnecessary tests.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. cargo-test-prune

    A Rust tool that uses mutation testing (via cargo-mutants) and a greedy set cover solution to suggest which tests can be pruned when tests overlap or are redundant.

    Problem: Tests tend to accumulate monotonically, especially when coding with AI, and the author wanted a countermeasure to eliminate unnecessary tests.

    Posted by @yasuyuky · Original source ↗

    Story title · @yasuyuky · · Source ↗

    Show HN: Find overlapping Rust tests with mutation testing

    Submitted URL · @yasuyuky · · Source ↗

    https://github.com/yasuyuky/cargo-test-prune

    Source text · @yasuyuky · · Source ↗

    To tackle the ever-increasing number of tests, I built cargo-test-prune.

    Source text · @yasuyuky · · Source ↗

    The idea behind it is to use cargo-mutants to generate mutants, and then solve the set cover problem for those mutants to suggest which tests can be eliminated.

    Source text · @yasuyuky · · Source ↗

    I came up with this as a countermeasure against the monotonically increasing tests that tend to accumulate, especially when coding with AI.