Skip to content
This repository has been archived by the owner on Jan 20, 2019. It is now read-only.

Commit

Permalink
Documentation is important. In this case it is also incomplete. More …
Browse files Browse the repository at this point in the history
…to come.
nloadholtes committed Jun 29, 2013
1 parent 42a7a65 commit 76a0e56
Showing 1 changed file with 37 additions and 11 deletions.
48 changes: 37 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,21 +3,47 @@ nose-randomize

A plugin to allow nose to run tests in a random order

This work is based on the code created by Charles McCreary as posted to https://code.google.com/p/python-nose/issues/detail?id=255
## About
When nose runs the tests in a given project, the order that the tests are loaded and excuted is always the same.

This project is attempting the following:
* ~~"proper" plugin structure~~
* The ability to randomize across all tests, not just within the TestCase class
* High (as close to 100% as possible) test coverage. Currently over 78%.
For unit tests, an ideal situation is one of isolation: Each test should be able to run independently of the other tests in the project. If there is a dependency (such as Test_A must run first in order for Test_B to pass) then the test authors might want to look at how they have thier tests setup.

This plugin allows for randomization of the tests in a test class when they are run. In theory this should prove (_or disprove_) the isolation of the tests because they can be run in a random order every time and this should expose any pre-condition dependencies that might exist.

To do list:
- [ ] Fix setup.py
- [ ] ???
## Installation

The original source of the code is:
To install from source:

http://code.google.com/p/python-nose/issues/detail?id=255
```shell
python setup.py install
```

and the original author is: Charles McCreary
_(Coming soon)_ To install from pip:

```shell
pip install randomize
```

## Usage

_(coming soon)_

## Limitations

Currently this plugin is only able to randomize the tests within a Class or Module. It does not support running the Classes in a random order.

For example if you have 3 test classes (TestClass1, TestClass2, TestClass3), they will be called in that order. The tests within each class will be executed in a random order, but the classes them selves will be called in the same order every time.

************

## Important notes

* *License* - This plugin is LGPL Licensed per the original author

* *Original author* - This work is based on the code created by Charles McCreary as posted to https://code.google.com/p/python-nose/issues/detail?id=255

* *Goals of this version* - This project is attempting the following:
> * The ability to randomize across all tests, not just within the TestCase class
> * High (as close to 100% as possible) test coverage. Currently 82%.
* *Questions? Comments?* - Please feel free to open an issue on this project's github page: [https://github.com/nloadholtes/nose-randomize]

0 comments on commit 76a0e56

Please sign in to comment.