/Users/konstantinignatyev/dev/playground/mgr/grinder/httpscript_wa_tests.py

1    # 
2    # The Grinder version 3.0-beta26 
3    # 
4    # HTTP tests recorded by the TCPProxy at Aug 13, 2005 7:55:25 PM 
5    # 
6     
7    from HTTPClient import NVPair 
8    from net.grinder.plugin.http import HTTPRequest 
9    from net.grinder.script import Test 
10    
11   tests = {} 
12    
13    
14   headers0 = ( NVPair('Accept', 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'),  
15               NVPair('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'),  
16               NVPair('Accept-Encoding', 'gzip,deflate'),  
17               NVPair('Accept-Language', 'en-us,en;q=0.5'),  
18               NVPair('Referer', 'http://localhost:8080/wa_myfaces/_notes.jsf'),  
19               NVPair('User-Agent', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6'), ) 
20   request0 = HTTPRequest(headers = headers0) 
21   tests[0] = Test(0, 'GET home').wrap(request0) 
22    
23    
24   headers1 = ( NVPair('Accept', 'text/css,*/*;q=0.1'),  
25               NVPair('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'),  
26               NVPair('Accept-Encoding', 'gzip,deflate'),  
27               NVPair('Accept-Language', 'en-us,en;q=0.5'),  
28               NVPair('If-Modified-Since', 'Sun, 14 Aug 2005 00:42:26 GMT'),  
29               NVPair('Referer', 'http://localhost:8080/wa_myfaces/home.jsf'),  
30               NVPair('User-Agent', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6'), ) 
31    
32    
33    
34   headers2 = ( NVPair('Accept', 'image/png,*/*;q=0.5'),  
35               NVPair('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'),  
36               NVPair('Accept-Encoding', 'gzip,deflate'),  
37               NVPair('Accept-Language', 'en-us,en;q=0.5'),  
38               NVPair('If-Modified-Since', 'Sun, 14 Aug 2005 00:42:26 GMT'),  
39               NVPair('Referer', 'http://localhost:8080/wa_myfaces/home.jsf'),  
40               NVPair('User-Agent', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6'), ) 
41    
42    
43   headers3 = ( NVPair('Accept', 'image/png,*/*;q=0.5'),  
44               NVPair('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'),  
45               NVPair('Accept-Encoding', 'gzip,deflate'),  
46               NVPair('Accept-Language', 'en-us,en;q=0.5'),  
47               NVPair('User-Agent', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6'), ) 
48    
49    
50    
51   headers7 = ( NVPair('Accept', 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'),  
52               NVPair('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'),  
53               NVPair('Accept-Encoding', 'gzip,deflate'),  
54               NVPair('Accept-Language', 'en-us,en;q=0.5'),  
55               NVPair('Referer', 'http://localhost:8080/wa_myfaces/home.jsf'),  
56               NVPair('User-Agent', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6'), ) 
57   request7 = HTTPRequest(headers = headers7) 
58   tests[7] = Test(7, 'GET companiesList').wrap(request7) 
59    
60    
61   headers8 = ( NVPair('Accept', 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'),  
62               NVPair('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'),  
63               NVPair('Accept-Encoding', 'gzip,deflate'),  
64               NVPair('Accept-Language', 'en-us,en;q=0.5'),  
65               NVPair('Referer', 'http://localhost:8080/wa_myfaces/companiesList.jsf'),  
66               NVPair('User-Agent', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6'),  
67               NVPair('Content-Type', 'application/x-www-form-urlencoded'), ) 
68   request8 = HTTPRequest(headers = headers8) 
69   tests[8] = Test(8, 'POST companiesList(search all)').wrap(request8) 
70    
71    
72    
73   request10 = HTTPRequest(headers = headers8) 
74   tests[10] = Test(10, 'POST companiesList(choose company)').wrap(request10) 
75    
76    
77   request12 = HTTPRequest(headers = headers8) 
78   tests[12] = Test(12, 'POST companyCRUD(switch to edit mode)').wrap(request12) 
79    
80    
81   headers14 = ( NVPair('Accept', 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'),  
82               NVPair('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'),  
83               NVPair('Accept-Encoding', 'gzip,deflate'),  
84               NVPair('Accept-Language', 'en-us,en;q=0.5'),  
85               NVPair('Referer', 'http://localhost:8080/wa_myfaces/companyCRUD.jsf'),  
86               NVPair('User-Agent', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6'),  
87               NVPair('Content-Type', 'application/x-www-form-urlencoded'), ) 
88   request14 = HTTPRequest(headers = headers14) 
89   tests[14] = Test(14, 'POST companyCRUD(edit data)').wrap(request14) 
90    
91    
92    
93   request16 = HTTPRequest(headers = headers14) 
94   tests[16] = Test(16, 'POST companiesList(search the company)').wrap(request16) 
95    
96    
97