1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
5 Executing Functest suites
6 =========================
8 As mentioned in the configuration guide `[1]`_, Alpine docker containers have
9 been introduced in Euphrates.
10 Tier containers have been created.
11 Assuming that you pulled the container and your environement is ready, you can
12 simply run the tiers by typing (e.g. with functest-healthcheck)::
14 sudo docker run --env-file env \
15 -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
16 -v $(pwd)/images:/home/opnfv/functest/images \
17 opnfv/functest-healthcheck
21 +----------------------------+------------------+---------------------+------------------+----------------+
22 | TEST CASE | PROJECT | TIER | DURATION | RESULT |
23 +----------------------------+------------------+---------------------+------------------+----------------+
24 | connection_check | functest | healthcheck | 00:02 | PASS |
25 | api_check | functest | healthcheck | 03:19 | PASS |
26 | snaps_health_check | functest | healthcheck | 00:46 | PASS |
27 +----------------------------+------------------+---------------------+------------------+----------------+
29 You can run functest-healcheck, functest-smoke, functest-features,
30 functest-components and functest-vnf.
32 The result tables show the results by test case, it can be::
36 * SKIP: if the scenario/installer does not support the test case
41 If you want to run the test step by step, you may add docker option then run the
42 different commands within the docker.
44 Considering the healthcheck example, running functest manaully means::
46 sudo docker run -ti --env-file env \
47 -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
48 -v $(pwd)/images:/home/opnfv/functest/images \
49 opnfv/functest-healthcheck /bin/bash
51 The docker prompt shall be returned. Then within the docker run the following
54 $ source /home/opnfv/functest/conf/env_file
58 Each Alpine container provided on the docker hub matches with a tier.
59 The following commands are available::
63 ['connection_check', 'api_check', 'snaps_health_check']
64 # functest tier show healthcheck
65 +---------------------+---------------+--------------------------+-------------------------------------------------+------------------------------------+
66 | TIERS | ORDER | CI LOOP | DESCRIPTION | TESTCASES |
67 +---------------------+---------------+--------------------------+-------------------------------------------------+------------------------------------+
68 | healthcheck | 0 | (daily)|(weekly) | First tier to be executed to verify the | connection_check api_check |
69 | | | | basic operations in the VIM. | snaps_health_check |
70 +---------------------+---------------+--------------------------+-------------------------------------------------+------------------------------------+
72 To run all the cases of the tier, type::
74 # functest tier run healthcheck
78 Testcases can be listed, shown and run though the CLI::
80 # functest testcase list
84 # functest testcase show api_check
85 +-------------------+--------------------------------------------------+------------------+---------------------------+
86 | TEST CASE | DESCRIPTION | CRITERIA | DEPENDENCY |
87 +-------------------+--------------------------------------------------+------------------+---------------------------+
88 | api_check | This test case verifies the retrieval of | 100 | ^((?!netvirt).)*$ |
89 | | OpenStack clients: Keystone, Glance, | | |
90 | | Neutron and Nova and may perform some | | |
91 | | simple queries. When the config value of | | |
92 | | snaps.use_keystone is True, functest | | |
93 | | must have access to the cloud's private | | |
95 +-------------------+--------------------------------------------------+------------------+---------------------------+
96 # functest testcase run connection_check
100 You can also type run_tests -t all to run all the tests.
102 Note the list of test cases depend on the installer and the scenario.
105 Reporting results to the test Database
106 ======================================
107 In OPNFV CI we collect all the results from CI. A test APi shall be available
108 as well as a test database `[17]`_.
110 Functest internal API
111 =====================
113 An internal API has been introduced in Euphrates. The goal is to trigger
114 Functest operations through an API in addition of the CLI.
115 This could be considered as a first step towards a pseudo micro services
116 approach where the different test projects could expose and consume APIs to the
119 In Euphrates the main method of the APIs are:
124 * Update hosts info for domain name
125 * Prepare environment
131 * List all testcases within given tier
132 * Get the result of the specified task
133 * Get the log of the specified task
135 See `[16]`_ to get examples on how to use the API.
138 .. _`[1]`: http://docs.opnfv.org/en/latest/submodules/functest/docs/testing/user/configguide/index.html
139 .. _`[16]`: https://wiki.opnfv.org/display/functest/Running+test+cases+via+new+Functest+REST+API
140 .. _`[17]`: http://docs.opnfv.org/en/latest/testing/testing-dev.html