Live data from Hacker News

Effective Property-Based Testing

blog.auxon.io

1–10 of 36 posts

Re: Effective Property-Based Testing

#4
This is a great set of ideas for using property-based testing. I've found it useful to think of code in terms of invariants and contracts, and property-based testing lets me express those very directly in code. No other testing method comes close.

Re: Effective Property-Based Testing

#5
Property testing is awesome, but it does significantly slow down test suites. Are there any standard practices for striking a balance of getting the added confidence/safety of using property tests without introducing large delays into your CI pipeline?

Re: Effective Property-Based Testing

#6

Property testing is awesome, but it does significantly slow down test suites. Are there any standard practices for striking a balance of getting the added confidence/safety of using property tests without introducing large delays into your CI pipeline?

We like to run the tests as part of CI with a relatively small number of iterations, and then turn the knob way up in a nightly or weekly scheduled test job.

Re: Effective Property-Based Testing

#7

Property testing is awesome, but it does significantly slow down test suites. Are there any standard practices for striking a balance of getting the added confidence/safety of using property tests without introducing large delays into your CI pipeline?

You could fan-out tests to multiple FaaS instances.

Cloudflare Workers, for example, have no cold-starts. But they are JS/WASM only

Re: Effective Property-Based Testing

#8

Property testing is awesome, but it does significantly slow down test suites. Are there any standard practices for striking a balance of getting the added confidence/safety of using property tests without introducing large delays into your CI pipeline?

My understanding, shallow as it is, is that property testing goes great with pure functional code, because without side effects you can run tests in parallel, taking advantage of all of these cores and build servers we have.

If your tests are coupled, you're already in a bad way whether you know it or not. Dumping property testing on top of that without addressing the underlying cause sounds like a recipe for misery.

It's probably a great stick and carrot if you're pushing a tech debt reduction agenda though.

Post reply on HN