Skip to content

feat: add with_verbose() API and BOLERO_VERBOSE env var for per-itera… - #312

Open
bh1cqx wants to merge 1 commit into
camshaft:masterfrom
bh1cqx:feat-verbose-output
Open

bh1cqx wants to merge 1 commit into
camshaft:masterfrom
bh1cqx:feat-verbose-output

Conversation

@bh1cqx

@bh1cqx bh1cqx commented May 14, 2026

Copy link
Copy Markdown

…tion seed output

Adds a Verbose enum with a Seed variant that prints the RNG seed before each iteration, useful for reproducing timeout/kill failures where the failure banner never fires.

Can be enabled per-test with .with_verbose(Verbose::Seed) or globally via BOLERO_VERBOSE=seed (also accepts '1' or 'all' for all variants, comma-separated).

…tion seed output

Adds a Verbose enum with a Seed variant that prints the RNG seed
before each iteration, useful for reproducing timeout/kill failures
where the failure banner never fires.

Can be enabled per-test with .with_verbose(Verbose::Seed) or globally
via BOLERO_VERBOSE=seed (also accepts '1' or 'all' for all variants,
comma-separated).
Comment thread lib/bolero/src/lib.rs
Comment on lines +45 to +48
pub enum Verbose {
/// Print the seed for each RNG-based test input
Seed,
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this be more of a struct of bools? and then you could control which flags are set? We also need to set #[non_exhaustive] on it and impl Default

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was debating between a vec of variants and a struct of bools.. how would the opt in method look like then?

@camshaft camshaft May 14, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verbose {
    seed: true,
    ..Default::default()
}

or

Verbose::default().seed()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants