doc: fix link to creating unit tests in contributor guide
The testing strategy doc was linking to the hacking repo docs on creating unit tests, which are very specific to creating unit tests for hacking rules. This changes the link to the 'creating unit tests' section in the HACKING.rst file, which has more information on testing within nova. Along with that change, the HACKING.rst testing section is updated a bit to point out that we use stestr now instead of testr and adds a proper link to the development environment quickstart docs. The nova/tests/unit/README.rst actually needs a lot of work, but that's left for another day. Change-Id: Ie5106d87d632286162b31ce132e947c306d21abd Closes-Bug: #1732024
This commit is contained in:
parent
50c23d8c86
commit
85235d229b
22
HACKING.rst
22
HACKING.rst
@ -81,17 +81,17 @@ infrastructure in OpenStack Nova, please read ``nova/tests/unit/README.rst``.
|
|||||||
|
|
||||||
Running Tests
|
Running Tests
|
||||||
-------------
|
-------------
|
||||||
The testing system is based on a combination of tox and testr. The canonical
|
The testing system is based on a combination of tox and stestr. The canonical
|
||||||
approach to running tests is to simply run the command ``tox``. This will
|
approach to running tests is to simply run the command ``tox``. This will
|
||||||
create virtual environments, populate them with dependencies and run all of
|
create virtual environments, populate them with dependencies and run all of
|
||||||
the tests that OpenStack CI systems run. Behind the scenes, tox is running
|
the tests that OpenStack CI systems run. Behind the scenes, tox is running
|
||||||
``testr run --parallel``, but is set up such that you can supply any additional
|
``stestr run``, but is set up such that you can supply any additional
|
||||||
testr arguments that are needed to tox. For example, you can run:
|
stestr arguments that are needed to tox. For example, you can run:
|
||||||
``tox -- --analyze-isolation`` to cause tox to tell testr to add
|
``tox -- --analyze-isolation`` to cause tox to tell stestr to add
|
||||||
--analyze-isolation to its argument list.
|
--analyze-isolation to its argument list.
|
||||||
|
|
||||||
Python packages may also have dependencies that are outside of tox's ability
|
Python packages may also have dependencies that are outside of tox's ability
|
||||||
to install. Please refer to ``doc/source/development.environment.rst`` for
|
to install. Please refer to `Development Quickstart`_ for
|
||||||
a list of those packages on Ubuntu, Fedora and Mac OS X.
|
a list of those packages on Ubuntu, Fedora and Mac OS X.
|
||||||
|
|
||||||
To run a single or restricted set of tests, pass a regex that matches
|
To run a single or restricted set of tests, pass a regex that matches
|
||||||
@ -104,11 +104,13 @@ classes.
|
|||||||
|
|
||||||
It is also possible to run the tests inside of a virtual environment
|
It is also possible to run the tests inside of a virtual environment
|
||||||
you have created, or it is possible that you have all of the dependencies
|
you have created, or it is possible that you have all of the dependencies
|
||||||
installed locally already. In this case, you can interact with the testr
|
installed locally already. In this case, you can interact with the stestr
|
||||||
command directly. Running ``testr run`` will run the entire test suite. ``testr
|
command directly. Running ``stestr run`` will run the entire test suite.
|
||||||
run --parallel`` will run it in parallel (this is the default incantation tox
|
``stestr run --concurrency=1`` will run tests serially (by default, stestr runs
|
||||||
uses.) More information about testr can be found at:
|
tests in parallel). More information about stestr can be found at:
|
||||||
http://wiki.openstack.org/testr
|
http://stestr.readthedocs.io/
|
||||||
|
|
||||||
|
.. _Development Quickstart: https://docs.openstack.org/nova/latest/contributor/development-environment.html
|
||||||
|
|
||||||
Building Docs
|
Building Docs
|
||||||
-------------
|
-------------
|
||||||
|
@ -79,7 +79,7 @@ The correct level of unit test coverage is very subjective, and as such we are
|
|||||||
not aiming for a particular percentage of coverage, rather we are aiming for
|
not aiming for a particular percentage of coverage, rather we are aiming for
|
||||||
good coverage.
|
good coverage.
|
||||||
Generally, every code change should have a related unit test:
|
Generally, every code change should have a related unit test:
|
||||||
http://docs.openstack.org/developer/hacking/#creating-unit-tests
|
https://github.com/openstack/nova/blob/master/HACKING.rst#creating-unit-tests
|
||||||
|
|
||||||
Integration tests
|
Integration tests
|
||||||
-----------------
|
-----------------
|
||||||
|
Loading…
Reference in New Issue
Block a user