===================== Stress Tests for Kofa ===================== Stress- and performance tests in here are based on the Python package `multi-mechanize`. See the homepage http://testutils.org/multi-mechanize/ for details. Installation ------------ The stuff in here is basically buildout-based. But as two of the required packages (namely `matplotlib`) seem not to cope very well with `setuptools`, we have to install them locally before running 'bootstrap.py'. To make it work, you need a Python with the packages `multi-mechanize`, `numpy`, and `matplotlib` installed. I'm used to install such packages in a virtual environment like this:: $ virtualenv --no-site-packages mysandbox $ source mysandbox/bin/activate Afterwards the required packages can be installed into this sandbox:: (mysandbox) $ pip install numpy (mysandbox) $ pip install matplotlib (mysandbox) $ pip install multi-mechanize Especially `matplotlib` is very demanding regarding already installed (C and C++) libraries. On my Ubuntu I had to install at least:: $ sudo apt-get install libfreetype6-dev $ sudo apt-get install libpng12-dev to make it compile and install. Afterwards we can run buildout:: (mysandbox) $ python bootstrap.py which will generate the local buildout script. We use it:: (mysandbox) $ ./bin/buildout will take a long time. It installs local Kofa instances in the 'instances/' dir and generates some scripts we will need. Before we can really do stress tests, we need the local instances to be bootstrapped/buildouted once:: (mysandbox) $ ./bin/bootstrap_instances takes care for that. It runs bootstrap.py and buildout for each instance in 'instances/'. Finally, the stress tests can be run. Running Stresstests ------------------- The different stress tests are put into different multi-mechanize 'projects'. Each project runs a certain stress test for which you have to setup certain things to make it work. Basically, you run a stresstest like this:: (mysandbox) $ ./bin/stress-run where ```` is the name of one of the directories in here like 'kofa01'. So,:: (mysandbox) $ ./bin/stress-run kofa01 should give some results. The projects in here are the subdirectories, each one representing a different 'project' or kind of stresstest. Please see the respective README files in this folder to learn what conditions must be met to run each test. Generally, for each test project the configuration can be done in the test project root. Here you will find at least a `config.cfg` for ini-style configuration (required) and optionally a `pre_run.py` and `post_run.py` to care for things like setting up an instance and shutting it down afterwards. Please keep in mind, that these tests normally require some local or remote setup, for instance a running Kofa instance with certain reachable URLs. Again, you can lookup the specific READMEs in this directory to learn what setup is required to run a certain test.