source: main/waeup.stress/trunk/README.rst @ 11102

Last change on this file since 11102 was 8672, checked in by uli, 12 years ago

Decouple setup/teardown from multimechanize.

File size: 2.9 KB
Line 
1=====================
2Stress Tests for Kofa
3=====================
4
5Stress- and performance tests in here are based on the Python package
6`multi-mechanize`. See the homepage
7http://testutils.org/multi-mechanize/ for details.
8
9Installation
10------------
11
12The stuff in here is basically buildout-based. But as two of the
13required packages (namely `matplotlib`) seem not to cope very well
14with `setuptools`, we have to install them locally before running
15'bootstrap.py'.
16
17To make it work, you need a Python with the packages
18`multi-mechanize`, `numpy`, and `matplotlib` installed.
19
20I'm used to install such packages in a virtual environment like this::
21
22  $ virtualenv --no-site-packages mysandbox
23  $ source mysandbox/bin/activate
24
25Afterwards the required packages can be installed into this sandbox::
26
27  (mysandbox) $ pip install numpy
28  (mysandbox) $ pip install matplotlib
29  (mysandbox) $ pip install multi-mechanize
30
31Especially `matplotlib` is very demanding regarding already installed
32(C and C++) libraries. On my Ubuntu I had to install at least::
33
34  $ sudo apt-get install libfreetype6-dev
35  $ sudo apt-get install libpng12-dev
36
37to make it compile and install.
38
39Afterwards we can run buildout::
40
41  (mysandbox) $ python bootstrap.py
42
43which will generate the local buildout script. We use it::
44
45  (mysandbox) $ ./bin/buildout
46
47will take a long time. It installs local Kofa instances in the
48'instances/' dir and generates some scripts we will need.
49
50Before we can really do stress tests, we need the local instances to
51be bootstrapped/buildouted once::
52
53  (mysandbox) $ ./bin/bootstrap_instances
54
55takes care for that. It runs bootstrap.py and buildout for each
56instance in 'instances/'.
57
58Finally, the stress tests can be run.
59
60Running Stresstests
61-------------------
62
63The different stress tests are put into different multi-mechanize
64'projects'. Each project runs a certain stress test for which you have
65to setup certain things to make it work.
66
67Basically, you run a stresstest like this::
68
69  (mysandbox) $ ./bin/stress-run <PROJECT>
70
71where ``<PROJECT>`` is the name of one of the directories in here like
72'kofa01'.
73
74So,::
75
76  (mysandbox) $ ./bin/stress-run kofa01
77
78should give some results.
79
80The projects in here are the subdirectories, each one representing a
81different 'project' or kind of stresstest. Please see the respective
82README files in this folder to learn what conditions must be met to
83run each test.
84
85Generally, for each test project the configuration can be done in the
86test project root. Here you will find at least a `config.cfg` for
87ini-style configuration (required) and optionally a `pre_run.py` and
88`post_run.py` to care for things like setting up an instance and
89shutting it down afterwards.
90
91Please keep in mind, that these tests normally require some local or
92remote setup, for instance a running Kofa instance with certain
93reachable URLs. Again, you can lookup the specific READMEs in this
94directory to learn what setup is required to run a certain test.
Note: See TracBrowser for help on using the repository browser.