re: Writing Good Unit-Tests: A Step By Step Tutorial VIEW POST

TOP OF THREAD FULL DISCUSSION
re: All the random tests with {lat, lon} ∈ {[-90, 90], [-180, 180]} should pass returning a value that is less than 20K km approx. All the random tests...

Thank you for the example. This seems like a great "casting net" for all sorts of general bugs and problems.

Still, I'd add some manually-written tests on top of these. I wouldn't rely on randomised tests more than I would rely on my domain knowledge. For example, a set of randomised tests wouldn't be able to "tell" you about problems you might experience around 180th meridian or around poles. They don't know the reason behind these problems. A human, on the other hand, is able to (re)read the requirements, think critically and figure out all sorts of problems using a creative systematic approach.

code of conduct - report abuse