Random Test values are not Random
PicassoCT opened this issue · comments
PicassoCT commented
Statically initialized seeds lead to same values in every sequence. E.g:
Quaternion Based TransformTest
Random random = new Random(45L);
QuaternionBasedTransform transform = EuclidCoreRandomTools.nextQuaternionBasedTransform(random);
will always result in:
x = -0.5599634331913013
y = 0.5960433401296669
z = 0.41656366724225924
s = 0.3970491169985922
Recommended solution is initializing with a source of random: System.nanoTime()
Sylvain commented
Hi!
That's actually done on purpose, that allows to reproduce a failing test locally.