r2 - 27 Jul 2006 - 15:14:26 - MikealRogersYou are here: OSAF >  Projects Web  >  QualityAssuranceTeam > QAToolsDevelopment > Broadsword > Broadswordstress

Broadsword stress testing script

Where is stress.py

srtess.py lives in the tools repository under the broadsword project.

svn co svn+ssh://svn.osafoundation.org/svn/tools/broadsword/trunk/stress.py stress.py

What is stress.py

stress.py is a script that allows you to run a suite of tests simultaneously in different threads.

How do I use stess.py

Example:

$ python stress.py tests=test1:class1,test2:class2 recurrence=20 debug=1 threads=4

Available Parameters:

 host - Location of server instance, defaults localhost
 port - The port its running, defaults to 8080
 path - This is the url path (ex. /cosmo or /scooby). Defaults to /scooby
 recurrence - This is how many times its going to execute. (add 100 events, or calendars etc. depending on the test.) defaults 0
 debug - this defines the level of output, defauts to 0
 threads - the number of threads to run the tests in
 tests - this a list of the tests to run delimited by commas, each test needs the test and class to be instantiated, colon delimited
    - Example(the test name and classname don't have to be the same they just happen to be that way with the scoobytests): 
    - tests=test1:class1,test2:class2,testx:classx

To run your test you use the command line, example (output is abridged):

$ python stress.py tests=myTest:myTest recurrence=20 debug=1 threads=2
Starting thread : 0
Starting thread : 1
instanceList.append(cosmoticket)
instanceList.append(cosmoticket)
instanceList.append(cosmobugs)
instanceList.append(cosmobugs)
instanceList.append(cosmofreebusy)
instanceList.append(cosmofreebusy)
instanceList.append(cosmo500events)
instanceList.append(cosmo500events)
instanceList.append(cosmomkcalendar)
instanceList.append(cosmomkcalendar)
instanceList.append(cosmoinvalid)
instanceList.append(cosmoinvalid)
instanceList.append(cosmomultiget)
instanceList.append(cosmomultiget)
instanceList.append(cosmobasicquery)
instanceList.append(cosmobasicquery)
instanceList.append(cosmotimerangequery)
instanceList.append(cosmolimitexpand)
Thread 1 :: startingTest Setup Accounts
instanceList.append(cosmotimerangequery)
instanceList.append(cosmolimitexpand)
Thread 0 :: startingTest Setup Accounts
Thread 1 :: Failure :: Test Status Code Check on 201 :: expected 201 ; received 204
Thread 0 :: Failure :: Test Status Code Check on 201 :: expected 201 ; received 204
Thread 1 :: Failure :: Test Status Code Check on 201 :: expected 201 ; received 204
Thread 1 :: startingTest OK (read-only)
Thread 1 :: Failure :: Test Status Code Check on 200 :: expected 200 ; received 501
Success :: Thread 1 :: Class CosmoLimitExpand :: VerifyDAVResponseItemsInElement :: Test 2.xml : time-range query with limit over different range; {urn:ietf:params:xml:ns:caldav}calendar-data in 5.ics;
Success :: Thread 1 :: Class CosmoLimitExpand :: VerifyDAVResponseItemsInElement :: Test 2.xml : time-range query with limit over different range; {urn:ietf:params:xml:ns:caldav}calendar-data in 6.ics;
Success :: Thread 1 :: Class CosmoLimitExpand :: VerifyDAVResponseItemsInElement :: Test 2.xml : time-range query with limit over different range; {urn:ietf:params:xml:ns:caldav}calendar-data in 7.ics;
PASSED 274 :: FAILED 1114 :: CLASSES 10 :: THREADS 2 :: RECURRENCES 1 :: 1388 TOTAL TESTS RUN
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.