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