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

Add ability to set random seed #38

Open
peddie opened this issue May 15, 2020 · 3 comments
Open

Add ability to set random seed #38

peddie opened this issue May 15, 2020 · 3 comments

Comments

@peddie
Copy link

peddie commented May 15, 2020

Thanks for this handy library. We're using it as part of a CI process which we'd like to be deterministic in the sense that if I make some changes that don't affect a component that's property-tested in the CI process, a failure of a property test shouldn't cause the CI system to reject my changes. To do this, we'd like to be able to set a fixed seed in this CI process (rather than deriving it from IO as tasty-hedgehog currently does) and vary the seed as part of a separate testing process when we want to search for existing bugs that could be but haven't been found.

A good way to pass a fixed seed would be as an environment variable. A command-line argument could also work.

cc @ghorn

@ghorn
Copy link

ghorn commented May 15, 2020

A command-line argument would be significantly more convenient for our build system at work.

@mbg
Copy link
Collaborator

mbg commented Apr 17, 2022

Hi @peddie and @ghorn. Sorry that there hasn't been a response to this issue. I just wanted to check if you still need something like this? I note that hedgehog itself includes an option for this as of version 1.1.1 by setting an environment variable named HEDGEHOG_SEED. There is also the existing HedgehogReplay option in this library.

@peddie
Copy link
Author

peddie commented Apr 20, 2022

Thanks for checking in. This is not urgently blocking anything, and the HEDGEHOG_SEED workaround works, but it would still be more convenient to be able to pass a command-line argument.

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

No branches or pull requests

3 participants