On 08/24/2016 04:14 AM, Edwin van Leeuwen wrote:
I might be dense, but the only other thing than integration tests that I
can think of is if you use random data for testing, but that would be
more correctly solved by using more random data during the unittests.
Nothing is worse than tests that only sometimes fail.

Randomized unit testing is a respected approach to testing: https://hackage.haskell.org/package/QuickCheck, https://github.com/rickynils/scalacheck, https://blogs.msdn.microsoft.com/dsyme/2008/08/08/fscheck-0-2/, etc. Some of the Phobos tests I wrote use it (and virtually all of my current code e.g. on median computation), and when they fail I just print the seed of the RNG and then hardcode it to reproduce the test. -- Andrei

Reply via email to