Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
The TestRunner (Extracted from carlin).
Python R JavaScript C++ Inno Setup Shell Other

This branch is 14 commits ahead, 6965 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
b/resources
conf
lib
longevity
pytests
resources
scripts
unittests
.gitignore
Makefile
README
TestInput.py
testrunner

README

testrunner

Syntax: testrunner [options]

Options:
 -c <file>        runlist name                      example -c conf/py-all.conf
 -t <test>        test case                         example : -t setgettests.MembaseBucket.value_100b
 -i <file>        resource file                     example : -i resources/jenkins/single-node-centos-32.ini
 -p key=value     key,value pairs                   example : version=xyz,key1=value1 : example  : -p version=1.7.0,amazon=true


Requirements:
 Python >= 2.6
 Paramiko (http://www.lag.net/paramiko/)
 pycrypto https://www.dlitz.net/software/pycrypto/

 pycrypto is not supported on all windows platform, and unfortunately
 the authors of pycrypto thinks that gcc is the only compiler available
 for a unix platforms and adds gcc-specific compiler options. To build
 the modules with Sun Studio compilers you need to modify setup.py:

125c125
<             self.__add_compiler_option("-std=c99")
---
>             self.__add_compiler_option("-xc99=all")
140,141c140
<                 self.__add_compiler_option("-O3")
<                 self.__add_compiler_option("-fomit-frame-pointer")
---
>                 self.__add_compiler_option("-xO3")

 while paramiko and pycrypto both support pypi package
 installation i still recommend downloading and installing these two modules manually.

 wget http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.3.tar.gz
 tar -xvf pycrypto-2.3.tar.gz
 cd pycrypto-2.3
 python setup.py build
 python setup.py install
 cd ..
 wget http://www.lag.net/paramiko/download/paramiko-1.7.4.tar.gz
 tar -xvf paramiko-1.7.4.tar.gz
 cd paramiko-1.7.4
 python setup.py build
 python setup.py install
 cd ..

Resource File:

Ini files represents the ns_server information which is accessible to the tests.

[global] section defines the rest username,password that tests use to login to ns_server

Example:

[global]
username:Administrator
password:membase

[membase]
rest_username:Administrator
rest_password:asdasd

[servers] section lists port and ssh related information. ssh connection information
is required for small subset of tests where test needs to perform installation,backup or restore.
If ns_server instances are started using ns_server/cluster_run script then you only need to define ip and port
for those nodes.

Example:

[servers]
1:10.1.6.104_1
2:10.1.6.104_2
3:10.1.6.104_3
4:10.1.6.104_4

[10.1.6.104_1]
ip:10.1.6.104
port:9000

[10.1.6.104_2]
ip:10.1.6.104
port:9001

[10.1.6.104_3]
ip:10.1.6.104
port:9002

[10.1.6.104_4]
ip:10.1.6.104
port:9003

Test Execution and Reporting:

For every test run testrunner creates a temp folder and dumps the logs and xunit reports in the newly generated folder.

for instance if you run
./testrunner -i resources/jenkins/single-node-centos-32.ini -t setgettests.MembaseBucket.value_100b

you will see this summary after each test is ran.

summary so far suite setgettests.MembaseBucket , pass 1 , fail 0
logs and results are available under tmp-12-11-47

ls  tmp-12-11-47/
report-12-11-47.xml-setgettests.MembaseBucket.xml	value_100b.log

Development:

When using git on Linux/OSX systems, you might run into issues where
git incorrectly believes Windows-related files have been modified.
In reality, git is merely mis-treating CRLF line endings.
Try the following...

    cd testrunner
    git config core.autocrlf false

Something went wrong with that request. Please try again.