Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative Stateful API #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrwest
Copy link
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