11 | | |
12 | | == Design of the Test Suite == |
13 | | |
14 | | * The tests are located in {{{modules/tests/load}}} |
15 | | * There are group of requests which will be common to many tests. Eg - login requests will be common to all tests which require login. |
16 | | * Such requests are stored in {{{modules/tests/load/helpers}}} |
17 | | * These helpers can be included in the tests for maximum code reuse. |
18 | | * Using the helpers, different range of tests can be written, as per the usecase. |
19 | | * Eg - A test has - |
20 | | * 20% users creating staff |
21 | | * 40% users searching for staff |
22 | | * 40% users visiting the homepage |
23 | | * This can be written by defining 3 sessions, with probabilities 20%, 40% and 40%. |
24 | | * The content(requests) in these individual sessions can be imported from the helper xml files. |
25 | | * See {{{modules/tests/load/search_staff.xml}}} for an example of one such session. |
26 | | |
27 | | == Running the tests == |
28 | | * Setup your machine - [http://eden.sahanafoundation.org/wiki/DeveloperGuidelines/Testing/Load/Setup Load/Setup] |
29 | | * Change the path of tsung-1.0.dtd in the DOCTYPE if you have changed the the tsung installation directory to {{{<tsung_directory>/share/tsung/tsung-1.0.dtd}}} |
30 | | * Run tsung -f <path_to_test_file> start |
31 | | * To generate the report, go to the log directory and run - {{{/opt/tsung-1.4.2/lib/tsung/bin/tsung_stats.pl}}} |
32 | | * Note : Installation directory for tsung is opt/tsung-1.4.2 as per the Setup instructions on wiki. If you have changed that, then run {{{<tsung_directory>/lib/tsung/bin/tsung_stats.pl}}} to generate the report. |