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

Last change on this file since 8661 was 8658, checked in by uli, 12 years ago

Update docs.

File size: 2.6 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/multimech-run <PROJECT>
70
71where ``<PROJECT>`` is one of the directories in here like 'kofa01'.
72
73So,::
74
75  (mysandbox) $ ./bin/multimech-run kofa01
76
77should give some results.
78
79The projects in here are the subdirectories, each one representing a
80different 'project' or kind of stresstest. Please see the respective
81README files in this folder to learn what conditions must be met to
82run each test.
83
84Please keep in mind, that these tests normally require some local or
85remote setup, for instance a running Kofa instance with certain
86reachable URLs. Again, you can lookup the specific READMEs in this
87directory to learn what setup is required to run a certain test.
Note: See TracBrowser for help on using the repository browser.