X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=docs%2Fdevelopment%2Foverview%2Ftesting.rst;h=663d4c3fb6d664d3679ebe7ee19d8ac73ca49485;hb=2eb1c7f3fbd2a4bf6468f63e64ea3c1496236fe5;hp=cd39ee03b7072a4219c9de9ec8d0ce62d978e7ac;hpb=6f0575c366df07b253f1a59e360baf98ccd4c2d2;p=doctor.git diff --git a/docs/development/overview/testing.rst b/docs/development/overview/testing.rst index cd39ee03..663d4c3f 100644 --- a/docs/development/overview/testing.rst +++ b/docs/development/overview/testing.rst @@ -10,7 +10,7 @@ for doctor CI. You need to install OpenStack and other OPNFV components except Doctor Sample Inspector, Sample Monitor and Sample Consumer, as these will be launched in -this script. You are encouraged to use OPNFV offcial installers, but you can +this script. You are encouraged to use OPNFV official installers, but you can also deploy all components with other installers such as devstack or manual operation. In those cases, the versions of all components shall be matched with the versions of them in OPNFV specific release. @@ -18,33 +18,57 @@ the versions of them in OPNFV specific release. Run Test Script =============== -Doctor project has own testing script under `doctor/tests`_. This test script +Doctor project has own testing script under `doctor/doctor_tests`_. This test script can be used for functional testing agained an OPNFV deployment. -.. _doctor/tests: https://gerrit.opnfv.org/gerrit/gitweb?p=doctor.git;a=tree;f=tests; +.. _doctor/doctor_tests: https://git.opnfv.org/doctor/tree/doctor_tests Before running this script, make sure OpenStack env parameters are set properly -following `OpenStack CLI manual`_, so that Doctor Inspector can operate +(See e.g. `OpenStackClient Configuration`_), so that Doctor Inspector can operate OpenStack services. -.. _OpenStack CLI manual: https://docs.openstack.org/user-guide/common/cli-set-environment-variables-using-openstack-rc.html +.. _OpenStackClient Configuration: https://docs.openstack.org/python-openstackclient/latest/configuration/index.html -Then, you can run the script as follows: +Doctor now supports different test cases and for that you might want to +export TEST_CASE with different values: + +.. code-block:: bash + + #Fault management (default) + export TEST_CASE='fault_management' + #Maintenance (requires 3 compute nodes) + export TEST_CASE='maintenance' + #Use Fenix in maintenance testing instead of sample admin_tool + export ADMIN_TOOL_TYPE='fenix' + #Run both tests cases + export TEST_CASE='all' + +Run Python Test Script +~~~~~~~~~~~~~~~~~~~~~~ + +You can run the python script as follows: .. code-block:: bash git clone https://gerrit.opnfv.org/gerrit/doctor - cd doctor/tests - export INSTALLER_TYPE=local - export INSPECTOR_TYPE=sample - ./run.sh + cd doctor && tox + +You can see all the configurations with default values in sample configuration +file `doctor.sample.conf`_. And you can also modify the file to meet your +environment and then run the test. -INSTALLER_TYPE can be 'apex', 'fuel', 'joid' and 'local'(default). If you are -not using OPNFV installers in this option, chose 'local'. -INSPECTOR_TYPE can be specified either 'sample'(default) or 'congress'. +.. _doctor.sample.conf: https://git.opnfv.org/doctor/tree/etc/doctor.sample.conf -For testing with stable version, checkout stable branch of doctor repo before -'./run.sh'. +In OPNFV Apex jumphost you can run Doctor testing as follows using tox: + +.. code-block:: bash + + source overcloudrc + export INSTALLER_IP=${INSTALLER_IP} + export INSTALLER_TYPE=${INSTALLER_TYPE} + git clone https://gerrit.opnfv.org/gerrit/doctor + cd doctor + sudo -E tox Run Functest Suite ================== @@ -55,18 +79,18 @@ Functest container. You can run the Doctor test with the following steps: .. code-block:: bash DOCKER_TAG=latest - docker pull opnfv/functest:${DOCKER_TAG} + docker pull docker.io/opnfv/functest-features:${DOCKER_TAG} docker run --privileged=true -id \ -e INSTALLER_TYPE=${INSTALLER_TYPE} \ -e INSTALLER_IP=${INSTALLER_IP} \ -e INSPECTOR_TYPE=sample \ - opnfv/functest:${DOCKER_TAG} /bin/bash - docker exec python /home/opnfv/repos/functest/functest/ci/prepare_env.py start - docker exec functest testcase run doctor + docker.io/opnfv/functest-features:${DOCKER_TAG} /bin/bash + docker exec functest testcase run doctor-notification See `Functest Userguide`_ for more information. -.. _Functest Userguide: http://artifacts.opnfv.org/functest/docs/userguide/index.html +.. _Functest Userguide: :doc:`` + For testing with stable version, change DOCKER_TAG to 'stable' or other release tag identifier.