Changes between Version 33 and Version 34 of BluePrint/Testing/TestSuite


Ignore:
Timestamp:
08/08/13 01:37:28 (8 years ago)
Author:
Michael Howden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/Testing/TestSuite

    v33 v34  
    137137===== Design of the Test Suite =====
    138138
    139 * The tests are located in {{{modules/tests/load}}}
    140 * There are group of requests which will be common to many tests. Eg - login requests will be common to all tests which require login.
    141 * Such requests are stored in {{{modules/tests/load/helpers}}}
    142 * These helpers can be included in the tests for maximum code reuse.
    143 * Using the helpers, different range of tests can be written, as per the usecase.
    144  * Eg - A test has -
    145   * 20% users creating staff
    146   * 40% users searching for staff
    147   * 40% users visiting the homepage
    148  * This can be written by defining 3 sessions, with probabilities 20%, 40% and 40%.
    149  * The content(requests) in these individual sessions can be imported from the helper xml files.
    150  * See {{{modules/tests/load/search_staff.xml}}} for an example of one such session.
    151 * Each use-case of the load test can be written down in separate tests which are to be located in {{{modules/tests/load}}}.
    152  * Eg - Usecase is 20% users creating staff, 40% searching staff, 40% generating reports on staff.
    153  * This usecase is captured by writing a test which has 3 sessions -
    154   * create_staff with probability = 20%
    155   * search_staff with probability = 40%
    156   * report_staff with probability = 40%
    157  * Each of the session is written using helper xml files located in {{{modules/tests/load/helpers}}}
    158  * Eg - Writing {{{&login_page;}}} inside the session will import the login requests.
    159 * There needs to be significant amount of data in the database, to incorporate usecases like searching in a database of 10,000 records.
    160 * A python script will be used to create such data and add it to the database. This will reside in {{{modules/tests/load/data}}}.
    161  * This will be run prior to the test so that the data is available at the time of testing.
    162 * Also, some data is required for the tsung load tests.
    163  * Eg - For load tests which test creation of records, the data needs to be provided in CSV format.
    164  * This will also be done by a similar script as above.
    165  * It writes the data into the CSV file, whereas the script above writes the data into the database.
    166 
     139See: BluePrint/Testing/Load
    167140===== Running the tests =====
    168141* Setup your machine - [http://eden.sahanafoundation.org/wiki/DeveloperGuidelines/Testing/Load/Setup Load/Setup]