News for hackers. Stuff that matters.
Re:Unit Testing is Overrated (2020) by kelseyfrog on Thursday April 07, 2022 @11:43AM (#30946022)
Property based tests have caught 10-100x the number of buggy edge-cases than the handwritten unit tests I could have come up with. The material gains of getting a combinatorial explosion of test cases from property composition is extremely underrated.

However, there seems to be a general skepticism around property based tests in my experience. Any idea where it stems from?

Re:Unit Testing is Overrated (2020) by dgb23 on Thursday April 07, 2022 @04:30PM (#30949954)
IMO, you have to code in a certain way to make them ergonomic or even worthwhile - which is also true for example tests. They have some overlap with example tests but have a different advantage. Example tests document function/interface usage and typical or historical errors/exceptions. Property based tests are more about data integrity and invariants.
Re:Unit Testing is Overrated (2020) by oxff on Saturday April 09, 2022 @03:04AM (#30965817)
It requires more mathematical / analytical thinking and code IME.