gord chung 48751822dd clean up non-install parts of contributor docs
- remove specific comments about preferring notifications v. polling
just say, polling can add load
- remove kafka publisher reference
- remove database publisher reference
- move key links (wiki, launchpad, ml, etc...) to index
- put all meter details in one area
- clean up testing

Change-Id: I1993a9945334ffe631f2ddb3dcd0316d0e71f258
2017-12-15 14:02:38 +00:00

1.7 KiB

Running the Tests

Ceilometer includes an extensive set of automated unit tests which are run through tox.

  1. Install tox:

    $ sudo pip install tox
  2. Run the unit and code-style tests:

    $ cd /opt/stack/ceilometer
    $ tox -e py27,pep8

As tox is a wrapper around testr, it also accepts the same flags as testr. See the testr documentation for details about these additional flags.

Use a double hyphen to pass options to testr. For example, to run only tests under tests/unit/image:

$ tox -e py27 -- image

To debug tests (ie. break into pdb debugger), you can use ''debug'' tox environment. Here's an example, passing the name of a test since you'll normally only want to run the test that hits your breakpoint:

$ tox -e debug ceilometer.tests.unit.test_bin

For reference, the debug tox environment implements the instructions here: https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests