4 ms·
Seeded RNG.
by anonacct37 9y ago
Seeded RNG.
- snewman 9y agoExactly, you use a fixed RNG seed so that the behavior is reproducible. For complex multithreaded code, it can become difficult to achieve consistent execution, but a fixed seed is at least a good start.
- cortesoft 9y agoSo not really random, then? What is the point of adding an RNG if it is going to output the same values every time?
- anonacct37 9y agoIf you generate 10k test cases that find edge cases you wouldn't have normally found, that's value. If the framework is deterministic and always runs the same 10k test cases, that's generally valuable as well. I'm not aware of anyone currently looking to ensure their test cases our generated using cryptographically random data.
- jeanmichelx 9y agoBecause then the testing stimulus is not hard coded anymore, but generated. It's then trivial to run longer sequences, or tweak the test. In hardware design, where reliability is key (making a chip costs multiple millions and 6 months time), there is only random testing (with seed for reproducibility), not "that bunch of case that the person testing thought of that day"