blob: e54d4c0358f693d18dc8acce63e0e00fa18f9bac [file] [log] [blame]
Matthew Treinish817a8082014-07-25 16:07:20 -04001.. _unit_tests_field_guide:
Matthew Treinisha9aef872014-07-25 16:03:08 -04002
Masayuki Igawac268dd62013-09-18 00:51:05 +09003Tempest Field Guide to Unit tests
4=================================
Matthew Treinish32d35702013-08-13 11:59:06 -04005
6What are these tests?
7---------------------
8
9Unit tests are the self checks for Tempest. They provide functional
10verification and regression checking for the internal components of tempest.
11They should be used to just verify that the individual pieces of tempest are
12working as expected. They should not require an external service to be running
13and should be able to run solely from the tempest tree.
14
15Why are these tests in tempest?
16-------------------------------
17These tests exist to make sure that the mechanisms that we use inside of
18tempest to are valid and remain functional. They are only here for self
19validation of tempest.
20
21
22Scope of these tests
23--------------------
24Unit tests should not require an external service to be running or any extra
25configuration to run. Any state that is required for a test should either be
26mocked out or created in a temporary test directory. (see test_wrappers.py for
27an example of using a temporary test directory)