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

Look at implementing generative tests for some parts of the API #203

Open
designfrontier opened this issue Jan 27, 2016 · 3 comments
Open

Comments

@designfrontier
Copy link
Member

https://github.com/graue/gentest

and the discussion here https://news.ycombinator.com/item?id=10070027

These aren't unit tests, they're generative tests. They're used for different things. Unit tests make assertions about how a program responds to a specific input. Generative tests make assertions about invariants in a program over a wide range of inputs.
The workflow for using them is very different. A unit test suite contains a finite number of assertions and, assuming no bugs, should run in a relatively small (or at least bounded) amount of time. A generative test, however, usually can run forever by design.
A typical workflow is to start a run overnight and see if it caught anything in the morning. If the generative suite finds any bugs, you turn the specific cases that caused the failures into unit tests and commit them.

They could be an interesting way of hardening the system as a whole.

@designfrontier
Copy link
Member Author

It would be nice to open some specific issues for areas where this sort of testing makes sense. Hence the first-contribution flag. Bonus points if those tickets come with PRs to implement that generative tests.

@designfrontier
Copy link
Member Author

Another library: https://github.com/mcandre/node-quickcheck

@designfrontier
Copy link
Member Author

And a third https://github.com/jsverify/jsverify this one looks the most complete at the moment

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

No branches or pull requests

1 participant