Skip to content

Improve statistics interface #343

Description

@jmid

To inspect the distribution of generators QCheck offers

As part of reworking the generator and extending our existing tests of Stdlib.Sys I found myself

Based on the above, I found myself

  • wanting a generalization of set_collect that would allow to describe and summarize several separately specified labelings for one test - currently set_collect is singular, whereas set_stats is plural (and add_stat lets us add more)

and envious about

  • labelExamples - to observe a sample from a label (e.g., "What's an example classified as a non-empty list?")
  • checkCoverage - to ensure a certain distribution (e.g., "At lease 10% of the test input is Some with a non-empty list")

along the lines of the Haskell and Elm APIs:
https://hackage.haskell.org/package/QuickCheck-2.15.0.1/docs/Test-QuickCheck.html#g:21
https://package.elm-lang.org/packages/elm-explorations/test/2.2.0/Fuzz#labelExamples
https://package.elm-lang.org/packages/elm-explorations/test/2.2.0/Test-Distribution
https://package.elm-lang.org/packages/elm-explorations/test/2.2.0/Test#reportDistribution

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions