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

Stateful properties #8

Merged
merged 1 commit into from
Apr 25, 2021
Merged

Stateful properties #8

merged 1 commit into from
Apr 25, 2021

Conversation

keathley
Copy link
Member

@keathley keathley commented Apr 25, 2021

Adding some stateful property tests. A few API changes needed to be made to accommodate this. I also added specs and dialyzer support. Added oath contracts for some key operations that can't be type checked. Finally, I removed nimble_options because it had breaking API changes and I wasn't happy with how it was behaving.

@QuinnWilton
Copy link

Oh this is awesome! For my upcoming Norm talk, I was really hoping to mention stateful testing, but I'm starting to worry that it might be outside of the scope of a 30 minute talk that also needs to cover Norm + StreamData + a few other things, given that PropEr is really what you want to be using for stateful testing.

With that being said, do you mind if I point people towardMentat as being a great real-world demonstration of what stateful testing looks like in Elixir?

@keathley keathley force-pushed the stateful-properties branch from 2113cad to a3bcbe1 Compare April 25, 2021 20:03
@keathley
Copy link
Member Author

@QuinnWilton Yeah of course :). I was also considering writing up a blog post that talks about the "clock" pattern and how to make "time" more deterministic. Having that knowledge spread around is a good.

@QuinnWilton
Copy link

Awesome, thank you! It was a little bit like a bat signal seeing a notification pop up on my phone saying a pull request was opened on a project I follow, with "stateful properties" in the name.

That blog post sounds really valuable, but I also think in general the pattern of using Norm to specify your options is a really powerful one, in terms of enabling really thorough fuzzing of your code.

@keathley keathley force-pushed the stateful-properties branch from a3bcbe1 to 960b4f4 Compare April 25, 2021 20:45
@keathley keathley force-pushed the stateful-properties branch from 960b4f4 to ac808f0 Compare April 25, 2021 20:48
@keathley keathley merged commit 864f0b6 into main Apr 25, 2021
@keathley keathley deleted the stateful-properties branch April 25, 2021 21:06
Copy link
Member

@mhanberg mhanberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants