Expand description

This framework builds on the proptest framework to make it easier to build stateful property-based tests. By “stateful”, we mean that the intent is to be able to test stateful systems, which we do by modeling the state of the system under test and using that model to assist in generating test cases and defining the expected results.

The code in this framework generates test cases as sequences of operations, and shrinks test cases by removing operations from the sequence. Individual operation themselves are not currently shrunk. Adding the ability to shrink individual operations within a sequence is non-trivial, since it tends to break preconditions in a way that is difficult to compensate for. There may be ways around this, but in my personal experience, shrinking via just removing operations has been sufficient to yield simple and useful minimal failing cases, so shrinking individual ops is not a priority right now.

There is currently no way to symbolically model the outputs of operations when generating test cases, so the inputs to each operation must be able to have concrete values generated at test case generation time. At some point, we may try to add the feature support necessary to remove this limitation, but for now the current framework code has been sufficient for our needs.

Structs

Traits

  • A trait for defining stateful property tests.

Functions

  • Execute a property test for the specified test model, using the config values passed in.