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.
102 Note that the flavors for the SNAPS test cases are able to be configured giving
103 new metadata values as well as new values for the basic elements of flavor
104 (i.e. ram, vcpu, disk, ephemeral, swap etc).
105 The snaps.flavor_extra_specs dict in the config_functest.yaml file could be
106 used for this purpose.
108 Reporting results to the test Database
109 ======================================
110 In OPNFV CI we collect all the results from CI. A test API shall be available
111 as well as a test database `[16]`_.
114 .. _`[1]`: http://docs.opnfv.org/en/latest/submodules/functest/docs/testing/user/configguide/index.html
115 .. _`[16]`: http://docs.opnfv.org/en/latest/testing/testing-dev.html