summaryrefslogtreecommitdiffstats
path: root/TESTING.rst
diff options
context:
space:
mode:
authorAnita Kuno <anita.kuno@enovance.com>2013-06-18 11:06:36 -0400
committerAnita Kuno <anita.kuno@enovance.com>2013-06-20 20:44:43 -0400
commit22b04511494b400d31f738082e0497b91265ef86 (patch)
tree35a0d3580c6e5f92dff9db654f34dcfbf4aadda8 /TESTING.rst
parent688832fd379776bf12f21f76c884caa42a48d2c5 (diff)
downloadoslo-22b04511494b400d31f738082e0497b91265ef86.tar.gz
oslo-22b04511494b400d31f738082e0497b91265ef86.tar.xz
oslo-22b04511494b400d31f738082e0497b91265ef86.zip
Creates a new file TESTING.rst.
Creates a new file called TESTING.rst making the file discoverable. Contents of the file include very generic instructions to get newcomers started with testing. File also includes links, including the OpenStack wiki page on testing, encouraging the curious to access greater options for testing individual projects as well as greater flexibility in testing. Change-Id: I57ab249133eccd38fa5302809e06172ed6a7d89e
Diffstat (limited to 'TESTING.rst')
-rw-r--r--TESTING.rst88
1 files changed, 88 insertions, 0 deletions
diff --git a/TESTING.rst b/TESTING.rst
new file mode 100644
index 0000000..4191b1b
--- /dev/null
+++ b/TESTING.rst
@@ -0,0 +1,88 @@
+===========================
+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:
+
+if testr is in tox.ini, for example::
+
+ [testenv]
+
+ includes "python setup.py testr --slowest --testr-args='{posargs}'"
+
+run individual tests with the following syntax::
+
+ tox -e <env> -- path.to.module:Class.test
+so for example, *run the cpu_limited test in Nova*::
+
+ tox -e py27 -- nova.tests.test_claims:ClaimTestCase.test_cpu_unlimited
+
+if nose is in tox.ini, for example::
+
+ [testenv]
+
+ includes "nosetests {posargs}"
+
+run individual tests with the following syntax::
+
+ tox -e <env> -- --tests path.to.module:Class.test
+so for example, *run the list test in Glance*::
+
+ tox -e py27 -- --tests glance.tests.unit.test_auth.py:TestImageRepoProxy.test_list
+
+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