disneystreaming / weaver-test

A test framework that runs everything in parallel.
https://disneystreaming.github.io/weaver-test/
Other
442 stars 49 forks source link

Contrib module #375

Closed keynmol closed 8 months ago

keynmol commented 3 years ago

Weaver's commitment to talking in terms of CE's primitives is a very powerful idea, meaning that a lot of interesting things can be implemented without ever hooking into the framework's internals/changing its behaviour.

This issue is in part inspired by the following discussion: https://github.com/disneystreaming/weaver-test/discussions/374, but also by my long-standing desire to write a module for speculative testing in weaver.

So my proposal is having a contrib module, which can be seen as a collection of various ideas, strategies for testing, etc.

Constraints:


So far my ideas are:

  1. Multiplexing:
    • Run N instances of same test, and
      • guarnatee all succeeded
      • guarantee at least 1 succeeded
      • report the first one that finished, no matter how
    • Run test until it succeeds, sequentially (with max N tests spawned)
  2. Support for "cancel all tests if one has failed" - which I didn't think of before, but now I like the idea more and more
Baccata commented 3 years ago

I agree. I think we can try to make these modules generic respectively to effect types, before defaulting to effect-specific versions...The scalacheck integration gives a good example of how to do that.