Converted existing markdown documentation to RST format.
[snaps.git] / docs / how-to-use / Testing.rst
1 Running Unit Test Suite
2 =======================
3
4 These tests are written in Python and require an that it is setup before running the tests.
5 See `install directions <index.md>`__ for Python installation instructions.
6
7 Start by cloning the snaps-provisioning repository
8 --------------------------------------------------
9
10 ``git clone https://gerrit.cablelabs.com/snaps-provisioning``
11
12 Install Library
13 ---------------
14
15 ``pip install -e <path to repo>/``
16
17 Execute the tests
18 -----------------
19
20 | ``cd <path to repo>   python snaps/unit_test_suite.py -e [path to RC file] -n [external network name]``
21 | \* All Supported Arguments
22 | \* -e [required - The path to the OpenStack RC file]
23 | \* -n [required - The name of the external network to use for routers
24   and floating IPs]
25 | \* -p [optional - the proxy settings if required. Format :
26 | \* -s [optional - the proxy command used for SSH connections]
27 | \* -l [(default INFO) The log level]
28 | \* -k [optional - When set, tests project and user creation. Use only
29   if host running tests has access to the cloud's admin network]
30 | \* -f [optional - When set, will not execute tests requiring Floating
31   IPS]
32 | \* -u [optional - When set, the unit tests will be executed]
33
34 Test descriptions
35 =================
36
37 `Unit Testing <UnitTests.rst>`__ - Tests that do not require a connection to OpenStack
38 --------------------------------------------------------------------------------------
39
40 `OpenStack API Tests <APITests.rst>`__ - Tests many individual OpenStack API calls
41 ----------------------------------------------------------------------------------
42
43 `Integration Tests <IntegrationTests.rst>`__ - Tests OpenStack object creation in a context. These tests will be run within a custom project as a specific user.
44 ----------------------------------------------------------------------------------------------------------------------------------------------------------------