sageserpent-open / plutonium

CQRS providing bitemporal object modelling for Java POJOs and Scala too.
MIT License
5 stars 0 forks source link

Spike use of Hedgehog #55

Open sageserpent-open opened 5 years ago

sageserpent-open commented 5 years ago

Did you see what I did there?

Hedgehog is a replacement for ScalaCheck that integrates test case shrinkage with the generators, so shrunk test cases will conform to any constraints imposed by the generators.

As the tests for Plutonium use Scalacheck a lot, and usually with very complex constraints, it is currently impossible to shrink test cases with Scalacheck without breaking the tests trivially due to constraint violations.

The result is that debugging of test failures has to be done with 'full-size' test cases - this is a real pain in practice, often resulting in the bugs suite being used to house cut-down hand-written tests that summarize the product of days of bug analysis from the full-size test case. Even that requires a fair bit of manual temporary editing of the Scalacheck generators as a ham-fisted way of performing test case shrinkage,

Right now, Hedgehog would need to be integrated into Scalatest in the same way as Scalacheck, so there is some significant work in this spike.

sageserpent-open commented 4 years ago

ZIO has also introduced a property testing framework with integrated shrinking, this should be looked at too.