flyingmutant / rapid

Rapid is a modern Go property-based testing library
https://pkg.go.dev/pgregory.net/rapid
Mozilla Public License 2.0
579 stars 25 forks source link

Feature request : Tags for reporting distribution of generated data sets #51

Closed ashishnegi closed 1 year ago

ashishnegi commented 1 year ago

Hey Folks

In real world complex scenarios, visualizing the buckets in which generated input is falling helps debug/improve the generators. I did not find this functionality in library.

Please see similar feature in cpp rapidcheck library document.

Example: User generator with name, sex, date of birth can add tags like male/female for sex, child/adult/old for age.

After running test, distribution will show the buckets and will help identify if there is any mistake in generator or if we are generating domain-interesting inputs or not. This is very useful for real world scenarios.

flyingmutant commented 1 year ago

There is already an existing issue, let's keep the discussion there: #30 (and a WIP PR #31).