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