QuickTheories icon indicating copy to clipboard operation
QuickTheories copied to clipboard

Alternative Stateful API

Open jrwest opened this issue 6 years ago • 0 comments

This PR adds an alternative API for writing stateful property-based tests. It provides the following features:

  • Ability to write tests that have a randomly generated series of actions in addition to randomly generated inputs for those actions
  • Track state during the test and base the generation of actions and inputs on the current state
  • Allows selectable actions to be filtered by a precondition
  • Validation can be performed within the action or in postconditions.
  • Provides convenient high-level API as well as low-level API that can be integrated with the existing stateful API

Examples can be found in:

Other notes:

  • One of the tests is currently commented out because it depends on #50
  • By default, when using this API, the shrinker is disabled. This is because the current shrinker needs improvements to properly shrink these tests. The user can override the default and enable the shrinker if desired.

jrwest avatar Mar 13 '19 17:03 jrwest