diff options
author | James E. Blair <jeblair@openstack.org> | 2013-07-02 11:23:46 -0700 |
---|---|---|
committer | Jenkins <jenkins@review.openstack.org> | 2013-07-06 18:24:10 +0000 |
commit | 9ab86621c8e0bf8b7ee38ec2b4266e545e110464 (patch) | |
tree | 23c439d3f1cb09ac9a456cc87bffe83e7d165aec /TESTING.rst | |
parent | cdccd976f722f3d443835b8534226de2d539240e (diff) | |
download | zuul-9ab86621c8e0bf8b7ee38ec2b4266e545e110464.tar.gz |
Add TESTING file
Change-Id: Ifa3ff45189b794dfb2c29e127599dbe547b57f71
Reviewed-on: https://review.openstack.org/35354
Reviewed-by: Anita Kuno <anteaya@anteaya.info>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Diffstat (limited to 'TESTING.rst')
-rw-r--r-- | TESTING.rst | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/TESTING.rst b/TESTING.rst new file mode 100644 index 000000000..f3fa28e7c --- /dev/null +++ b/TESTING.rst @@ -0,0 +1,73 @@ +=========================== +Testing Your OpenStack Code +=========================== +------------ +A Quickstart +------------ + +This is designed to be enough information for you to run your first tests. +Detailed information on testing can be found here: https://wiki.openstack.org/wiki/Testing + +*Install pip*:: + + [apt-get | yum] install python-pip +More information on pip here: http://www.pip-installer.org/en/latest/ + +*Use pip to install tox*:: + + pip install tox + +Run The Tests +------------- + +*Navigate to the project's root directory and execute*:: + + tox +Note: completing this command may take a long time (depends on system resources) +also, you might not see any output until tox is complete. + +Information about tox can be found here: http://testrun.org/tox/latest/ + + +Run The Tests in One Environment +-------------------------------- + +Tox will run your entire test suite in the environments specified in the project tox.ini:: + + [tox] + + envlist = <list of available environments> + +To run the test suite in just one of the environments in envlist execute:: + + tox -e <env> +so for example, *run the test suite in py26*:: + + tox -e py26 + +Run One Test +------------ + +To run individual tests with tox:: + + tox -e <env> -- path.to.module.Class.test + +For example, to *run the basic Zuul test*:: + + tox -e py27 -- tests.test_scheduler.TestScheduler.test_jobs_launched + +To *run one test in the foreground* (after previously having run tox +to set up the virtualenv):: + + .tox/py27/bin/python -m testtools.run tests.test_scheduler.TestScheduler.test_jobs_launched + +Need More Info? +--------------- + +More information about testr: https://wiki.openstack.org/wiki/Testr + +More information about nose: https://nose.readthedocs.org/en/latest/ + + +More information about testing OpenStack code can be found here: +https://wiki.openstack.org/wiki/Testing |