[docs] add test manual 23/28223/5
authorRyota MIBU <r-mibu@cq.jp.nec.com>
Tue, 7 Feb 2017 11:21:54 +0000 (11:21 +0000)
committerRyota MIBU <r-mibu@cq.jp.nec.com>
Fri, 17 Feb 2017 05:12:18 +0000 (05:12 +0000)
Change-Id: Ieb02b6fdf5f09fcd8bb803c1186c45284755061c
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
docs/development/overview/index.rst [new file with mode: 0644]
docs/development/overview/testing.rst [new file with mode: 0644]

diff --git a/docs/development/overview/index.rst b/docs/development/overview/index.rst
new file mode 100644 (file)
index 0000000..4026ea0
--- /dev/null
@@ -0,0 +1,12 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+************************
+Doctor Development Guide
+************************
+
+.. toctree::
+    :maxdepth: 2
+    :numbered:
+
+    testing.rst
diff --git a/docs/development/overview/testing.rst b/docs/development/overview/testing.rst
new file mode 100644 (file)
index 0000000..cd39ee0
--- /dev/null
@@ -0,0 +1,75 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+==============
+Testing Doctor
+==============
+
+You have two options to test Doctor functions with the script developed
+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
+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.
+
+Run Test Script
+===============
+
+Doctor project has own testing script under `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;
+
+Before running this script, make sure OpenStack env parameters are set properly
+following `OpenStack CLI manual`_, 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
+
+Then, you can run the 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
+
+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'.
+
+For testing with stable version, checkout stable branch of doctor repo before
+'./run.sh'.
+
+Run Functest Suite
+==================
+
+Functest supports Doctor testing by triggering the test script above in a
+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 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 <container_id> python /home/opnfv/repos/functest/functest/ci/prepare_env.py start
+    docker exec <container_id> functest testcase run doctor
+
+See `Functest Userguide`_ for more information.
+
+.. _Functest Userguide: http://artifacts.opnfv.org/functest/docs/userguide/index.html
+
+For testing with stable version, change DOCKER_TAG to 'stable' or other release
+tag identifier.
+
+Tips
+====