From dcb6e10b427d0a39b39b021211134f0822598484 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 28 Nov 2011 14:16:12 -0500 Subject: [PATCH] add seed --- index.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/index.md b/index.md index 1a41eae..9742194 100644 --- a/index.md +++ b/index.md @@ -322,6 +322,7 @@ jasmine-headless-webkit [ -c / --colors ] [ --report ] [ --runner-out ] [ -j / --jasmine-config ] + [ --seed ] {% endhighlight %} @@ -376,6 +377,16 @@ You can also use it in your own setups, to run specs remotely and stick the resu If for some reason you're not using the default path for a `jasmine.yml` file (which is `spec/javascripts/support/jasmine.yml`), you can provide that path with `-j`. +### Randomizing the order of spec files + +Spec files are shuffled into a random order before each run. This lets you find issues where spec files may depend on state +established in prior executed spec files -- a bad thing. After each run, you'll get the random seed used to randomize the files: + +`Test random seed: --seed 1234` + +If you're getting weird results related to the particula order of a run of specs, pass that same seed value back in +and get to work! + ### Running only certain spec files By default, if no files are passed into `jasmine-headless-webkit`, all possible spec files in the `spec_files` definition