Question

I know I can make scalacheck tests deterministic, but I have a more general question: does the default non-deterministic behaviour of scalacheck cause practical problems? I've always thought that the tests should be deterministic and repeatable, and the other way around signals a bad tests design. Scalacheck seems to be used in a couple of "serious" projects, so I'm wondering whether breaking this deterministic principle is or is not in fact a real-life (not only theoretical) problem?

Était-ce utile?

La solution

I'd say that "tests should be deterministic and repeatable" doesn't always apply. They obviously have their rather large place, but randomized testing is useful as well. In addition to QuickCheck/ScalaCheck and friends there are approaches such as fuzzing.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top