Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is scalacheck non-deterministic approach problematic?

Tags:

scalacheck

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?

like image 534
kuonirat Avatar asked Jan 25 '26 03:01

kuonirat


1 Answers

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.

like image 107
Alexey Romanov Avatar answered Jan 29 '26 06:01

Alexey Romanov