Once the credentials are there, they shall be sourced before running the tests::
- source /home/opnfv/functest/conf/openstack.creds
+ source /home/opnfv/functest/conf/openstack.creds
Additional Options
------------------
commit IDs or branches for the repositories, ...) copy the config_functest.yaml
from the repository to your current directory and run docker with a volume::
- $ wget https://git.opnfv.org/cgit/functest/plain/testcases/config_functest.yaml
- $ cmd1 = "/home/opnfv/repos/functest/docker/prepare_env.sh"
- $ cmd2 = "/home/opnfv/repos/functest/docker/run_tests.sh"
- $ docker run -t -e "INSTALLER_TYPE=fuel" -e "INSTALLER_IP=10.20.0.2" opnfv/functest \
- -v $(pwd)/config_functest.yaml:/home/opnfv/functest/conf/config_functest.yaml \
- "${cmd1} && ${cmd2}"
+ $ wget https://git.opnfv.org/cgit/functest/plain/testcases/config_functest.yaml
+ $ cmd1 = "/home/opnfv/repos/functest/docker/prepare_env.sh"
+ $ cmd2 = "/home/opnfv/repos/functest/docker/run_tests.sh"
+ $ docker run -t -e "INSTALLER_TYPE=fuel" -e "INSTALLER_IP=10.20.0.2" opnfv/functest \
+ -v $(pwd)/config_functest.yaml:/home/opnfv/functest/conf/config_functest.yaml \
+ "${cmd1} && ${cmd2}"
Integration in CI
You can find more information about the dashboard from Testing Dashboard wiki
page `[3]`_.
-
Overall Architecture
---------------------
-
+====================
The Test result management in Brahmaputra can be summarized as follows::
+-------------+ +-------------+ +-------------+
This Dashboard consumes the results retrieved thanks to the Test API.
Test API description
---------------------
-
+====================
The Test API is used to declare pods, projects, test cases and test results. An
additional method dashboard has been added to post-process the raw results. The
data model is very basic, 4 objects are created:
| POST | /pods | Declare a new POD |
| | | Content-Type: application/json |
| | | { |
- | | | "name": "pod_foo", |
- | | | "creation_date": "YYYY-MM-DD HH:MM:SS"|
+ | | | "name": "pod_foo", |
+ | | | "creation_date": "YYYY-MM-DD HH:MM:SS" |
| | | } |
+--------+--------------------------+-----------------------------------------+
| POST | /test_projects | Add a new test project |
| | | Content-Type: application/json |
| | | { |
- | | | "name": "project_foo", |
- | | | "description": "whatever you want" |
+ | | | "name": "project_foo", |
+ | | | "description": "whatever you want" |
| | | } |
+--------+--------------------------+-----------------------------------------+
| PUT | /test_projects/{project} | Update a test project |
| | | |
| | | Content-Type: application/json |
| | | { |
- | | | <the field(s) you want to modify> |
+ | | | <the field(s) you want to modify> |
| | | } |
+--------+--------------------------+-----------------------------------------+
| DELETE | /test_projects/{project} | Delete a test project |
| POST | /test_projects/{project}/| Add a new test case to {project} |
| | cases | Content-Type: application/json |
| | | { |
- | | | "name": "case_foo", |
- | | | "description": "whatever you want" |
- | | | "creation_date": "YYYY-MM-DD HH:MM:SS"|
- | | | "url": "whatever you want" |
+ | | | "name": "case_foo", |
+ | | | "description": "whatever you want" |
+ | | | "creation_date": "YYYY-MM-DD HH:MM:SS" |
+ | | | "url": "whatever you want" |
| | | } |
+--------+--------------------------+-----------------------------------------+
| PUT | /test_projects/{project}?| Modify a test case of {project} |
| | case_name={case} | |
| | | Content-Type: application/json |
| | | { |
- | | | <the field(s) you want to modify> |
+ | | | <the field(s) you want to modify> |
| | | } |
+--------+--------------------------+-----------------------------------------+
| DELETE | /test_projects/{project}/| Delete a test case |
| POST | /results | Add a new test results |
| | | Content-Type: application/json |
| | | { |
- | | | "project_name": "project_foo", |
- | | | "case_name": "case_foo", |
- | | | "pod_name": "pod_foo", |
- | | | "installer": "installer_foo", |
- | | | "version": "scenario_foo", |
- | | | "details": <your results> |
+ | | | "project_name": "project_foo", |
+ | | | "case_name": "case_foo", |
+ | | | "pod_name": "pod_foo", |
+ | | | "installer": "installer_foo", |
+ | | | "version": "scenario_foo", |
+ | | | "details": <your results> |
| | | } |
+--------+--------------------------+-----------------------------------------+
% (db_url, case_name, pod_name, version, payload), e
return False
-::
==========
References
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
Executing the functest suites
=============================
+
Manual testing
--------------
is located in *$repos_dir/functest/testcases/VIM/OpenStack/CI/custom_tests/test_list.txt*
Although *run_tests.sh* provides an easy way to run any test, it is possible to
-do a direct call to the desired test script. For example::
- python $repos_dir/functest/testcases/vPing/vPing.py -d
+do a direct call to the desired test script. For example:
+
+ python $repos_dir/functest/testcases/vPing/vPing.py -d
+
Automated testing
-----------------
scenario: 'onos'
....
-At the end of the Functest environment creation (prepare_env.sh see `[1]`_), a
-file */home/opnfv/functest/conf/testcase-list.txt* is created with the list of
+At the end of the Functest environment creation, a file
+*/home/opnfv/functest/conf/testcase-list.txt* is created with the list of
all the runnable tests.
Functest considers the static constraints as regular expressions and compare them
with the given scenario name.