Skip to content

Alternative Stateful API#55

Open
jrwest wants to merge 1 commit intoquicktheories:masterfrom
jrwest:upstream-stateful
Open

Alternative Stateful API#55
jrwest wants to merge 1 commit intoquicktheories:masterfrom
jrwest:upstream-stateful

Conversation

@jrwest
Copy link
Copy Markdown
Contributor

@jrwest jrwest commented Mar 13, 2019

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 Take samples from generators #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant