View Source

h2. Installing

Use git to grab everything and then make a distributable tar.gz of the testrunner
{code}
git clone git@github.com:membase/testrunner
cd testrunner
{code}

h2. Requirements:

# python 2.7
# pycrypto (http://www.dlitz.net/software/pycrypto/)
# paramiko (http://www.lag.net/paramiko/)

Test framework uses paramiko library for making ssh connections into linux and windows machines where membase is installed.

h2. resource file:

resource files are defined under resources/jenkins folder. we follow standard .ini format.

h2. Running Hello World

Tests are implemented in python using pyunit framework . so each test needs a setUp and tearDown method.
{code}
./testrunner -t management.addnodes.addnodestests.AddNodesTests.test_add_1_node_with_bucket

this command will run test_add_1_node_with_bucket test which is a method in AddNodesTests class defined under pytests/management/addnodestests.py

{code}

h2. Running

edit servers with each IP

servers
{code}
<ip1>
<ip2>
<ipn>
{code}

run a test that is located in ./conf
if your test uses "install" then add the \-v parameter with the correct version information
{code}
./testrunner -f servers -c smoke.conf -v 1.6.0beta3a-19-g81e14c
{code}

h2. Developing Tests

Just copy an existing test that you like as a starting point...
{code}
cd src/scripts/testrunner
cp -r tests/hello-world tests/harsh-new-test
./testrunner -t harsh-new-test -s localhost
{code}

TestRunner generates a report xml file after each test run named "report-$time" where time stands for the start-time for running one or multiple test.
The generated xml output follows the standard nunit xml reports which can be imported to other test databases.
example : report-09-55-39-.xml