Generation of test case data for Scala and Java, in the spirit of QuickCheck. When your test fails, it gives you a minimised failing test case and a way of reproducing the failure immediately.
MIT License
15
stars
1
forks
source link
Cause a test failure if no test cases are generated. #65
Sometimes no test cases are generated. This an due to:
Filtration via Trials.filter.
Guarding via Trials.whenever.
Post-hoc rejection via Trials.reject.
Too low a complexity limit.
These causes may either completely invalidate all test cases, or perhaps the limit has been set too low in Trials.withLimit leading to premature exhaustion after a run of invalid test cases.
In such a case the test will pass - this isn't good in a continuous integration build setup, as the test is no longer validating anything.
The aim is to have test case supply - either standalone or via the JUnit integrations - throw a special exception when no test cases were produced. There should be a way of switching this off and getting the old behaviour if desired, probably via a fluent method analagous to SupplyToSyntax.withComplexityLimit etc.
Sometimes no test cases are generated. This an due to:
Trials.filter
.Trials.whenever
.Trials.reject
.These causes may either completely invalidate all test cases, or perhaps the limit has been set too low in
Trials.withLimit
leading to premature exhaustion after a run of invalid test cases.In such a case the test will pass - this isn't good in a continuous integration build setup, as the test is no longer validating anything.
The aim is to have test case supply - either standalone or via the JUnit integrations - throw a special exception when no test cases were produced. There should be a way of switching this off and getting the old behaviour if desired, probably via a fluent method analagous to
SupplyToSyntax.withComplexityLimit
etc.