Skip to content

Recipe: Expand input coverage with property-based testing and fuzzing #6355

@moodmosaic

Description

@moodmosaic

Input coverage = how well we test the range of inputs, not just which lines or branches we hit. For example:

fn is_even(n: u32) -> bool {
    n % 2 == 0
}

Here, testing only n = 2 gives 100% line coverage but misses 0, 1, u32::MAX, etc. That’s low input coverage. We want to hit edge cases, boundaries, and weird values.

By pairing property-based testing (proptest via cargo test) with coverage-guided fuzzing (libFuzzer via cargo +nightly fuzz), we can explore code paths with broader, more meaningful input variation.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Status: 💻 In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions