summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md44
-rw-r--r--docs/userguide/HOWTO12
-rw-r--r--tests/gluster_basic_config.yml63
3 files changed, 91 insertions, 28 deletions
diff --git a/README.md b/README.md
index b999f2d8d..371229e38 100644
--- a/README.md
+++ b/README.md
@@ -8,9 +8,10 @@ The Libraries/Modules/Tests in glusto-tests are written using the `glusto`
framework. TestCases in glusto-tests can we written/run using standard
PyUnit, PyTest or Nose methodologies as supported by `glusto` framework.
-Refer the [docs](http://glusto.readthedocs.io/en/latest/) for info on `glusto`
-framework.
-Issues need to be filed against the Github repo.
+Refer the [glusto-doc](http://glusto.readthedocs.io/en/latest/) for info
+on `glusto` framework.
+Issues need to be filled against the
+[Github](https://github.com/gluster/glusto-tests/issues) repo.
To automate/run glusto-tests we need to install the following packages:
---------------------------------------------------------------------
@@ -49,40 +50,47 @@ How to install gdeploy:
-----------------------
- Install latest version of gdeploy from the following [link](https://copr.fedorainfracloud.org/coprs/sac/gdeploy/package/gdeploy/).
+To install glusto-tests dependencies:
+-------------------------------------
+`python-docx` needs to be installed when we run IO's and validates on client node.
+
+To install run :
+ # curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
+ # python get-pip.py
+ # pip install --pre python-docx
+
How to run the test case:
-------------------------
-- Create config file containing info about the servers, clients, volumes,
- mounts. Please refer to example config file under tests directory in
- glusto-tests repo. The example config file is in yaml format and
- defines sections which provides info about the gluster cluster.
- We can use any `glusto` framework supported formats for writing the
- config files.
- Refer the following [link](http://glusto.readthedocs.io/en/latest/userguide/configurable.html).
+- Create config file containing info about the servers, clients,
+ for example refer [config](https://github.com/gluster/glusto-tests/blob/master/tests/gluster_basic_config.yml),
+ this config file is enough to run all test cases. But if you need to override the default values of volumes,
+ mount.. etc which is passed in gluster_base_class, can be passed in config
+ file[config](https://github.com/gluster/glusto-tests/blob/master/tests/gluster_tests_config.yml).
+ Refer the following for more info [link](http://glusto.readthedocs.io/en/latest/userguide/configurable.html).
- glusto-tests are run using the `glusto` command available after installing
the glusto framework. The various options to run tests as provided by
glusto framework:
To run PyUnit tests:
-
# glusto -c 'config.yml' -d 'tests'
# glusto -c 'config.yml unittest_list.yml' -u
To run PyTest tests:
-
# glusto -c 'config.yml' --pytest='-v -x tests -m bvt'
To run Nose tests:
-
# glusto -c 'config.yml' --nosetests='-v -w tests'
- For more info refer the [docs](http://glusto.readthedocs.io/en/latest/userguide/glusto.html#options-for-running-unit-tests).
+ For more info about running these tests, refer the [docs](http://glusto.readthedocs.io/en/latest/userguide/glusto.html#options-for-running-unit-tests).
+
+- To know how to run glusto-tests from the scratch including creating OS, server, etc.. refer [link](https://github.com/gluster/glusto-tests/blob/master/docs/userguide/HOWTO)
Writing tests in glusto-tests:
------------------------------
`tests` directory in glusto-tests contains testcases. One might want to create
a dir with feature name as the name of test directory under `tests` to add
-new testcases.
+new testcases. Testcases name should start with`test_`
TestCases in glusto-tests can we written using standard PyUnit, PyTest or Nose
methodologies as supported by `glusto` framework.
@@ -91,6 +99,8 @@ One can follow the [PyUnit](http://glusto.readthedocs.io/en/latest/userguide/uni
or [PyTest](http://glusto.readthedocs.io/en/latest/userguide/pytest.html) docs to write PyTest tests,
or [Nose](http://glusto.readthedocs.io/en/latest/userguide/nosetests.html) docs to write Nose tests.
+For more info how to write testcases [developing-guide](https://github.com/gluster/glusto-tests/blob/master/docs/userguide/developer-guide.rst)
+
Logging:
--------
Log file name and Log level can be passed as argument to glusto command while
@@ -105,7 +115,3 @@ Default log location is: `/tmp/glustomain.log`
Note: When using `glusto` via the Python Interactive Interpreter,
the default log location is `/tmp/glusto.log`.
-
-Refer to `docs/userguide/HOWTO` for a detailed information
-on how to install/setup/run/ report
-
diff --git a/docs/userguide/HOWTO b/docs/userguide/HOWTO
index 9d8a657ca..5051cb51d 100644
--- a/docs/userguide/HOWTO
+++ b/docs/userguide/HOWTO
@@ -6,8 +6,6 @@ The testrun is divided in several phases:
3) Setup Servers/Clients Environment
4) Install glusto-tests dependencies
5) Running the tests
- 6) Reporting
- 7) Teardown
1) Installation of OS:
This phase is to install the OS on all the storage servers, clients.
@@ -61,6 +59,8 @@ The testrun is divided in several phases:
# python setup.py install
# cd glusto-tests/glustolibs-io
# python setup.py install
+ # cd glusto-tests/glustolibs-misc
+ # python setup.py install
- Install latest version of gdeploy from below link.
https://copr.fedorainfracloud.org/coprs/sac/gdeploy/package/gdeploy/
@@ -207,7 +207,7 @@ The testrun is divided in several phases:
# glusto -c 'config.yml' -d 'tests'
# glusto -c 'config.yml unittest_list.yml' -u
- To run PyTest tests:
+ To run PyTest tests(mostly used):
- To run all tests that are marked with tag 'bvt'.
# glusto -c 'config.yml' --pytest='-v -x tests -m bvt'
@@ -218,9 +218,3 @@ The testrun is divided in several phases:
# glusto -c 'config.yml' --nosetests='-v -w tests'
Refer: http://glusto.readthedocs.io/en/latest/userguide/glusto.html#options-for-running-unit-tests
-
-6) Reporting: TBD
-
-7) Teardown: TBD
-
-
diff --git a/tests/gluster_basic_config.yml b/tests/gluster_basic_config.yml
new file mode 100644
index 000000000..d43cb6f08
--- /dev/null
+++ b/tests/gluster_basic_config.yml
@@ -0,0 +1,63 @@
+log_file: /var/log/tests/gluster_tests.log
+log_level: DEBUG
+
+# 'servers' is list of Hostnames/IP's of servers in the cluster.
+# This section has to be defined.
+servers:
+ - server-vm1
+ - server-vm2
+ - server-vm3
+ - server-vm4
+ - server-vm5
+ - server-vm6
+
+# 'clients' is list of Hostnames/IP's of clients in the cluster.
+# This section has to be defined.
+clients:
+ - client-vm1
+ - client-vm2
+
+# 'servers_info' is info about each server in the cluster.
+# each server_info is a dict with 'Hostname/IP' of the server as key.
+# The info should contain the host(Hostname/IP) of server, devices to use
+# for creating bricks, brick_root i.e dirname of brick mount point.
+# Note: Use the same Hostname/IP used in the above 'servers' section.
+# This section has to be defined.
+
+servers_info:
+ server-vm1: &server1
+ host: server-vm1
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm2: &server2
+ host: server-vm2
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm3: &server3
+ host: server-vm3
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm4: &server4
+ host: server-vm4
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm5: &server5
+ host: server-vm5
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm6: &server6
+ host: server-vm6
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+
+# 'clients_info' is info about each client in the cluster.
+# each client_info is a dict with 'Hostname/IP' of the client as key.
+# The info should contain the host(Hostname/IP) of client, platform(Linux or
+# Windows), super_user name(Admin/Administrator/* in case of windows or root/*
+# in case of linux).
+# This section has to be defined.
+clients_info:
+ client-vm1: &client1
+ host: client-vm1
+ client-vm2: &client2
+ host: client-vm2