Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Tempest supports the REST API with JSON or XML format. It is implemented based on the “unittest2” and “nose” python test frameworks.
You can run Tempest cases like these ways:

  1. Run all cases in the specified directory (and sub directories):
    nosetests Tempest
  2. Run all cases in the specified file:
    nosetests tempest/tempest/api/compute/flavors/test_flavors.py
  3. Run all cases in the specified class:
    nosetests tempest/tempest/api/compute/flavors/test_flavors.py:FlavorsTestJSON
  4. Run the specified function:
    nosetests tempest/tempest/api/compute/flavors/test_flavors.py:FlavorsTestJSON.test_list_flavors

Hope it helps.
BTW, Nose recognizes test cases form source files, directories or packages automatically. Any classes, functions, files, directories or sub classes that match the regular expression: (?:^|[b_.-])[Tt]est will be identified and executed.
You can also write your own test cases by following the guide:
http://docs.openstack.org/developer/tempest/HACKING.html