Provides a plugin for nose (python testing framework) which will randomize the order tests are run. Using this plugin will help identify tests which are not isolated.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Running unit tests in a random order ensures that tests are isolated from eachother. Come issues which break isolation are databases being left in with data in them at the end of one test being used in the next test. When this happens simple changes to the first test may break the depenedent ones.


Add to your project. Then in your runner script simple import randomize.

Ask your test runner for help, ex. --help, and notice --randomize is now an option.


The randomize plugin does not do anything unless --randomize is passed in. When this flag is set the tests for each TestCase class will be randomly run. When an isolation problem is found use the seed printed at the beginning of the test output to run the suite in the same random order.

# Run tests in random order
python --randomize
# stdout: Using 1234567890 as seed
# Run tests using a particular random ordering
python --randomize --seed=1234567890


  • Add tests
  • Randomize across TestCase classes

Initial code from