summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <rgeorge@redhat.com>2018-10-25 15:07:11 +0530
committervamahaja <vamahaja@redhat.com>2018-12-07 14:49:22 +0530
commit5493ac5ecf9d6e3e840f7c31c989248f62170380 (patch)
treee0b3592d7d84569031639238443db1a24274174c
parent18a5901e5be6ed505a9416a9c29ae4573248d104 (diff)
Steps to setup test bed and run automated test cases
Change-Id: I4f980062ed3c2fad6dcbd623a1a5f42cd1c4a3ee Signed-off-by: Rachael George <rgeorge@redhat.com> Signed-off-by: vamahaja <vamahaja@redhat.com>
-rw-r--r--README89
1 files changed, 80 insertions, 9 deletions
diff --git a/README b/README
index fa53a045..0b5601d9 100644
--- a/README
+++ b/README
@@ -1,15 +1,86 @@
-=======
-Testing
-=======
+=====
+SETUP
+=====
-Install 'tox' package first:
+ - 1 Master
+ - 3 Storage nodes
+ - Passwordless ssh from the host (machine from where the tests would be
+ run) to all the nodes in the cluster
+ - Each node in the trusted storage pool should have 3 devices:
+ - Device 1 (part of the topology)
+ - Device 2 (part of the topology)
+ - Device 3 (Additional device not part of the topology)
- $ pip install git+git://github.com/tox-dev/tox.git@2.9.1#egg=tox
-Run 'pep8' checks:
+==============
+PRE-REQUISITES
+==============
- $ tox -e pep8
+The following steps have to be done on the host for a system-wide environment
-Run 'functional' tests:
+ - Install glusto-tests libraries
+ $ git clone http://review.gluster.org/glusto-tests
+ $ cd glusto-tests/glustolibs-gluster
+ $ python setup.py install
- $ tox -e functional -- glusto -c /path/to/config.yaml --pytest='-v -s tests'
+ - Install glustolibs-io libraries
+ $ cd glusto-tests/glustolibs-io
+ $ python setup.py install
+
+ - Install glustolibs-misc libraries
+ $ cd glusto-tests/glustolibs-misc
+ $ python setup.py install
+
+ - Clone the CNS automation repo
+ $ git clone \
+ ssh://<username>@code.engineering.redhat.com/cns-qe/cns-automation
+ $ cd /cns-automation/cns-libs
+ $ python setup.py install
+
+
+Follow below steps to configure "tox" on the host to run tests in a virtual
+environment
+
+ - Install the following system packages
+ $ yum install python-pip git gcc python-devel
+
+ - Install 'tox' package first:
+ $ pip install git+git://github.com/tox-dev/tox.git@2.9.1#egg=tox
+
+
+==================
+RUNNING TEST CASES
+==================
+
+Create a config file which lists out the OCP configurations like master and
+storage node details, heketi related configurations, the type and number of
+application pods, etc. Sample config file can be found under
+
+ cns-automation/tests/cns_tests_sample_config.yml
+
+To run test cases in a system-wide environment:
+
+ glusto -c <config_file> '--pytest=-v -rsx <test_file_path_or_dir>'
+
+ For example:
+
+ glusto -c ../tests/cns-automation-config.yaml \
+ '--pytest=-v -rsx ../tests -k test_dynamic_provisioning_p0_cases'
+
+ glusto -c ../tests/cns-automation-config.yaml \
+ '--pytest=-v -rsx ../tests -k test_volume_count_compare'
+
+To run the test cases in venv using tox command:
+
+ Run 'pep8' check for single file:
+
+ $ tox -e pep8 <absolute_file_path>
+
+ Run 'pep8' checks for all files:
+
+ $ tox -e pep8
+
+ Run 'functional' tests:
+
+ $ tox -e functional -- glusto -c /path/to/config.yaml \
+ --pytest='-v -rsx tests'