Changeset 7486
- Timestamp:
- 19 Jan 2012, 10:15:11 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/ulif-stress-multimech/multi-mechanize/projects/sirp1/test_scripts/get_application.py
r7480 r7486 1 1 import mechanize 2 2 import time 3 from mechanize import Browser 3 #from mechanize import Browser 4 from zope.testbrowser.browser import Browser 5 from helpers import BASE_URL 4 6 5 7 class Transaction(object): 6 8 def __init__(self): 7 9 self.custom_timers = {} 10 self.base_url = BASE_URL + 'applicants' 8 11 9 12 def run(self): 10 13 browser = Browser() 11 browser.set_handle_robots(False) 14 #browser.set_handle_robots(False) 15 12 16 13 17 start_timer = time.time() 14 resp = browser.open( 'http://localhost:8080/app-stress/applicants')15 resp.read()18 resp = browser.open(self.base_url)#'http://localhost:8080/app-stress/applicants') 19 #resp.read() 16 20 latency = time.time() - start_timer 17 21 18 22 self.custom_timers['SIRP Applicant Section'] = latency 19 23 20 assert (resp.code == 200), 'Bad HTTP Response' 21 assert ( 22 'Application Section' in resp.get_data() 23 ),'Failed Content Verification' 24 #assert (resp.code == 200), 'Bad HTTP Response' 25 assert ('Application Section' in browser.contents),'Failed Content Verification' 26 time.sleep(2.0) 27 #assert ( 28 # 'Application Section' in resp.get_data() 29 # ),'Failed Content Verification' 24 30 25 31
Note: See TracChangeset for help on using the changeset viewer.