-
Notifications
You must be signed in to change notification settings - Fork 116
How to seed your test
Kristian Karl edited this page Mar 4, 2021
·
5 revisions
Seeding your test, means that the random number generator that GraphWalker is using, will start off with a seed, thus generating the same path even if you are using a random path generator.
This is how you seed your test:
Running GraphWalker from a terminal, you add the option --seed
with a number, like:
java -jar graphwalker-cli-4.3.1.jar offline --seed 123456 -g test.json
In the GraphWalker json model file, add:
"seed": <NUMBER>,
See also JSON file format
In your java code, you can set the seed:
SingletonRandomGenerator.setSeed(1349327921);
See also: MultipleContextTest.java#54 for an example.