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 property-based testing #911

Open
pozorvlak opened this issue May 25, 2016 · 1 comment
Open

Add property-based testing #911

pozorvlak opened this issue May 25, 2016 · 1 comment

Comments

@pozorvlak
Copy link
Member

In other projects, I've found property-based testing to be a good way of catching bugs I'd never have thought to unit-test for. A quick Google turns up this property-based testing library for Ruby, which while not state-of-the-art looks good enough to get started with. I think this would be a relatively cheap way of increasing our coverage, finding bugs and making our code more robust.

Property-based tests usually use randomness, so we'd need to think about either (a) not running them in CI, or (b) somehow fixing the random seed so our builds don't become non-deterministic.

@pozorvlak
Copy link
Member Author

I had a thought about this: a good place to start could be... wait for it... controller tests! Throw random input data at our routes, and assert that we never see a 5xx error. This should avoid most of the brittleness problems of hand-crafted controller tests.

@Br3nda Br3nda added this to Backlog in Growstuff Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Growstuff
  
Backlog
Development

No branches or pull requests

1 participant