zio / zio

ZIO — A type-safe, composable library for async and concurrent programming in Scala
https://zio.dev
Apache License 2.0
4.1k stars 1.3k forks source link

ZIO Test: Add test annotation for property-based tests #2501

Open jdegoes opened 4 years ago

jdegoes commented 4 years ago

Users would like to know how things about their property-based tests, such as how many values were generated, and what is their distribution. Using test annotations, we can now do this quite cleanly.

To add a test annotation and renderer, the following process must be followed:

  1. Add a new TestAnnotation, one which keeps track of property-based testing metadata
  2. Access the test annotation from within the generators
  3. Define a new renderer for the TestAnnotation
  4. Compose the new renderer with the default test annotation renderer

TODO: Define scope.

adamgfraser commented 4 years ago

I will take this.