source: main/waeup.stress/trunk/kofa01/test_scripts/v_user2.py

Last change on this file was 8692, checked in by uli, 12 years ago

Use the second URL when running in ZEO mode.

File size: 620 bytes
Line 
1import mechanize
2import time
3from config import register_url, register_url2
4
5class Transaction(object):
6    def __init__(self):
7        pass
8
9    def run(self):
10        b = mechanize.Browser()
11        b.set_handle_robots(False)
12        start_time = time.time()
13        resp = b.open(register_url2)
14        content = resp.read()
15        latency = time.time() - start_time
16        self.custom_timers['Load_Registration_Page'] = latency
17        assert (resp.code == 200), 'Bad Response: HTTP %s' % resp.code
18        return
19
20if __name__ == '__main__':
21    trans = Transaction()
22    trans.run()
23    print trans.custom_timers
Note: See TracBrowser for help on using the repository browser.