1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
8 You have two options to test Doctor functions with the script developed
11 You need to install OpenStack and other OPNFV components except Doctor Sample
12 Inspector, Sample Monitor and Sample Consumer, as these will be launched in
13 this script. You are encouraged to use OPNFV offcial installers, but you can
14 also deploy all components with other installers such as devstack or manual
15 operation. In those cases, the versions of all components shall be matched with
16 the versions of them in OPNFV specific release.
21 Doctor project has own testing script under `doctor/tests`_. This test script
22 can be used for functional testing agained an OPNFV deployment.
24 .. _doctor/tests: https://gerrit.opnfv.org/gerrit/gitweb?p=doctor.git;a=tree;f=tests;
26 Before running this script, make sure OpenStack env parameters are set properly
27 following `OpenStack CLI manual`_, so that Doctor Inspector can operate
30 .. _OpenStack CLI manual: https://docs.openstack.org/user-guide/common/cli-set-environment-variables-using-openstack-rc.html
35 You can run the bash script as follows:
39 git clone https://gerrit.opnfv.org/gerrit/doctor
41 export INSTALLER_TYPE=local
42 export INSPECTOR_TYPE=sample
45 INSTALLER_TYPE can be 'apex', 'fuel', 'joid' and 'local'(default). If you are
46 not using OPNFV installers in this option, chose 'local'.
47 INSPECTOR_TYPE can be specified either 'sample'(default) or 'congress'.
49 For testing with stable version, checkout stable branch of doctor repo before
52 The bash test script will be deprecated(only bug fixes) after E Release.
54 Run Python Test Script
55 ~~~~~~~~~~~~~~~~~~~~~~
57 You can run the python script as follows:
61 git clone https://gerrit.opnfv.org/gerrit/doctor
64 You can see all the configurations with default values in sample configuration
65 file `doctor.sample.conf`_. And you can also modify the file to meet your
66 environment and then run the test.
68 .. _doctor.sample.conf: https://git.opnfv.org/doctor/tree/etc/doctor.sample.conf
73 Functest supports Doctor testing by triggering the test script above in a
74 Functest container. You can run the Doctor test with the following steps:
79 docker pull opnfv/functest:${DOCKER_TAG}
80 docker run --privileged=true -id \
81 -e INSTALLER_TYPE=${INSTALLER_TYPE} \
82 -e INSTALLER_IP=${INSTALLER_IP} \
83 -e INSPECTOR_TYPE=sample \
84 -e PYTHON_ENABLE=True \
85 opnfv/functest:${DOCKER_TAG} /bin/bash
86 docker exec <container_id> python /home/opnfv/repos/functest/functest/ci/prepare_env.py start
87 docker exec <container_id> functest testcase run doctor
89 Add an environment variable *PYTHON_ENABLE* to indicate that using Python or
90 Bash to run the test when start the docker container.
92 See `Functest Userguide`_ for more information.
94 .. _Functest Userguide: http://artifacts.opnfv.org/functest/docs/userguide/index.html
96 For testing with stable version, change DOCKER_TAG to 'stable' or other release