From fcohen at pushtotest.com Tue Jan 2 09:32:10 2007 From: fcohen at pushtotest.com (Frank Cohen) Date: Tue Jan 2 10:35:11 2007 Subject: [ptt-users] omission in post parameters In-Reply-To: References: Message-ID: <4C70546D-68A8-4A68-97E5-4170AB8B9AC6@pushtotest.com> Hi Geoff: Thanks for contributing your changes to the TestMaker community. I will let you know my thoughts about this in the next few days. I'm working on a maintenance release of TestMaker for later this month. I'll put together a beta this weekend and make it available to everyone for feedback/comments/fixes. -Frank On Dec 4, 2006, at 5:59 AM, Geoff Meakin wrote: > Hi Frank, > > > > I have solved my problem by tweaking an agentbase function and a > tool java class and include the code below- feel free to add it > into the source if you feel its appropriate (personally I think > it?s a really useful thing to be able to do). > > > > It now allows you to control the content type of a http-post, and > also post a pure value as well as key=value. > > > > In agentbase.py, post now reads: > > > > def post( self, url, params=None, contenttype='application/x- > www-form-urlencoded' ): > > > > And after setting the protocol I do: > > > > try: > > self.body.setContentType(contenttype) > > except: > > print "Unexpected error:", sys.exc_info()[0] > > self.body.setContentType(contenttype) > > > > And I have modified com/pushtotest/tool/protocolhandler/ > HTTPBody.java as follows: > > > > In the class declaration: > > > > private String contenttype = "application/x-www-form-urlencoded"; > > > > Modified addHeaders() method: > > > > public void addHeaders( HttpURLConnection con ) { > > con.setRequestProperty("Content-Type", contenttype); > > } > > > > New method: setContentType: > > > > public void setContentType( String newtype ) > > { > > contenttype=newtype; > > } > > > > Finally I have modified the method paramsAsString() as follows: > > > > ?.. > > for (int i=0; i < size; i++) { > > nkv = (keyvalue) params.elementAt( i ); > > > > String key = nkv.getKey(); > > String value = nkv.getValue(); > > > > if (key.length()==0) { > > buffer.append(value); > > } else { > > buffer.append(key).append("=").append(value); > > } > > > > Cheers > > -Geoff > > > > From: users-bounces@lists.pushtotest.com [mailto:users- > bounces@lists.pushtotest.com] On Behalf Of Geoff Meakin > Sent: 01 December 2006 10:59 > To: TestMaker users list; users@lists.pushtotest.com > Subject: RE: [ptt-users] omission in post parameters > > > > Hi, > > I have just read the w3c recs and spec, and note that basically you > can POST what you like as part of a POST request, but what is legal > depends on the Content-Type header declaration. > > Therefore for a application/x-www-form-urlencoded they do indeed > have to be key/value pairs, encoded properly. > > Therefore in this respect my application under test breaks the w3c > recs (nice) > > However, we are now modifying the Content-Type to text/xml, which > allows you to POST just xml. > > How would I do this in testmaker please? > > I.e. come up with something that looks like this: > > POST /url HTTP/1.1 > Host: foo.bar.com > Content-Type: text/xml > ..... more headers ..... > > > > > Thanks > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com on behalf of > Mark.Lutton@thomson.com > Sent: Thu 30/11/2006 18:55 > To: users@lists.pushtotest.com > Subject: FW: [ptt-users] omission in post parameters > > I don't think it is meaningful to have a single value without a > key. Here is an example of a POST request, which I got from http:// > www.jmarshall.com/easy/html/ : > > POST /path/script.cgi HTTP/1.0 > From: frog@jmarshall.com > User-Agent: HTTPTool/1.0 > Content-Type: application/x-www-form-urlencoded > Content-Length: 32 > > home=Cosby&favorite+flavor=flies > > You could also do this in the URL by putting the parameters into > the query: > > http://hostname.com/path/script.cgi?home=Cosby&favorite+flavor=flies > > But I don't know what the following means: > > http://hostname.com/path/script.cgi?Cosby > > Likewise: > > POST /path/script.cgi HTTP/1.0 > From: frog@jmarshall.com > User-Agent: HTTPTool/1.0 > Content-Type: application/x-www-form-urlencoded > Content-Length: 5 > > Cosby > > > In both cases Cosby looks like the key, not the value. On the > server side, what would ServletRequest.getParameterMap() return? > > A parameter value can be an array of strings; a single string is > equivalent to an array containing one string. Is this what you are > thinking of? I don't know the syntax for an array of values but I > guess it would be like this: > > self.params=[ [ '''key''', [ '''value1''', '''value2''', > '''value3''' ] ] ] > > So the following two would be equivalent: > > self.params= [ [ '''key''', [ '''value''' ] ] ] > > self.params= [ [ '''key''', '''value''' ] ] > > > Mark Lutton > Business Intelligence Services, a Thomson Business > > > ________________________________ > > From: users-bounces@lists.pushtotest.com on behalf of Geoff Meakin > Sent: Thu 11/30/2006 12:59 PM > To: TestMaker users list > Subject: [ptt-users] omission in post parameters > > > > Hi all, > > Does anyone know how to post a singleton parameter > > Normally: > > self.params= [ [ '''key''', '''value''' ] ] > self.post(url) > > However it should be possibly to also post: > > self.params= [ [ '''value''' ] ] > self.post(url) > > but doing this leads to an index out of bounds. > > I've checked HTTPBody.java and it DOES NOT have a method: > addParameter(String value) > > If anyone can help with how to do this, it would be gratefully > appreciated! > Or indeed any other thoughts... am a bit stuck out here! > > Cheers > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com > [mailto:users-bounces@lists.pushtotest.com] On Behalf Of Kyle Bell > Sent: 30 November 2006 15:40 > To: TestMaker users list > Subject: Re: [ptt-users] TestMaker 5 completion specification > > Frank, > > I know you were looking for some example code associated with SIP > enabled instant messaging clients. Follow the link below and click on > the Sip Communicator. This is a NIST sponsored IM and telephony > client. > > http://snad.ncsl.nist.gov/proj/iptel/ > > Regards, > > -Kyle > > On Wed, 2006-11-29 at 08:03 -0800, Frank Cohen wrote: > > That explains it. :-( Oh well. Thanks for finding this. I'll see > what > > > I can do when I write the TM 5 build scripts. Maybe I'll write my > own > > > zip handler. -Frank > > > > > > On Nov 29, 2006, at 7:42 AM, Kyle Bell wrote: > > > > > Frank, > > > > > > I found this tidbit from the ant user manual -> core tasks -> zip: > > > > > > Starting with Ant 1.5.2, can store Unix permissions > inside the > > > archive (see description of the filemode and dirmode attributes > for > > > ). Unfortunately there is no portable way to store > these > > > permissions. Ant uses the algorithm used by Info-Zip's > > > implementation of > > > the zip and unzip commands - these are the default versions of zip > and > > > unzip for many Unix and Unix-like systems. > > > > > > > > > Please note that the zip format allows multiple files of the same > > > fully- > > > qualified name to exist within a single archive. This has been > > > documented as causing various problems for unsuspecting users. If > you > > > wish to avoid this behavior you must set the duplicate > attribute to > a > > > value other than its default, "add". > > > > > > This likely explains your issue. The options available for the > > > duplicate attribute are as follows: > > > > > > duplicate -> behavior when a duplicate file is found. Valid values > are > > > "add", "preserve", and "fail". The default value is "add". > > > > > > In your zip task you may try specifying "preserve" as the value > rather > > > than the default of "add" and see where that takes you... > > > > > > Hope this helps... > > > > > > -Kyle > > > > > > > > > > > > On Mon, 2006-11-27 at 10:52 -0800, Frank Cohen wrote: > > >> Hi Kyle: Thanks for the feedback. See below. -Frank > > >> On Nov 27, 2006, at 9:41 AM, Kyle Bell wrote: > > >> > > >>> Frank, > > >>> > > >>> Nice feature list. I especially appreciate the first new > feature > > > >>> idea > > >>> by Bongos Amigos. I've not spent any time finding a good use > for > > >>> those > > >>> generated XML files and this would make them immediately > useful... > > >> > > >> Attached is an example TestScenario XML file. I'd love > feedback on > > > >> it. > > >> > > >>> Another enhancement or bug as it may be seen that I'd like to > see > > >>> addressed is the ability to kill a running TestCase from the > > >>> TestMaker > > >>> IDE which is not being controlled by XSTest. If a test case is > > >>> running > > >>> within the browser (perhaps it was written to run in an infinite > > >>> loop > > >>> correctly or by accident), I've not found a way to kill this > running > > >>> process as the "stop the agent" button appears not to be > effective. > > >> > > >> Interesting. When you click the stop button TestMaker kills the > > >> thread running the script. That's not a very nice way to do > it, but > > >> it's something necessary. I suppose another way would be to > have a > > >> signal to the running test case to stop. I'll give this some > thought. > > >> Thanks for making me aware of the problem. > > >> > > >> > > >> > > >>> Also, could I get you to make a small change to your ANT script > > >>> which > > >>> packages your distribution? I had previously suggested (and you > > >>> implemented) a change to make the permissions 755 on > TestMaker.sh > > > >>> when > > >>> you perform your packaging. Could I talk you into doing the > same > > > >>> with > > >>> TestMaker.bat? I also run TestMaker in some Windows systems > and I > > >>> find > > >>> myself doing this within a cygwin environment as well. Cygwin > > >>> requires > > >>> executable permissions on batch files for execution purposes and > > >>> this > > >>> would prevent the step of changing permissions for other > TestMaker > > >>> users > > >>> running in this environment. > > >> > > >> I'm ok with making that change. > > >> > > >> Maybe you can help me with a different problem. The way the > build.xml > > >> script is written now, the .sh files are correctly set with > the 755 > > >> permissions, but the resulting Zip file has two copies of the .sh > > >> files. It's totally weird to me to see WinZip on Windows ask > if it > > >> can overwrite the .sh files. Any idea what I'm doing wrong? > > >> > > >> > > >>> > > >>> Since you included my suggestion for a SIP UAC/UAS I now wish I > had > > >>> edited it a little more closely... :o) I'm unsure how you plan > to > > >>> implement this feature in a single day (I rather thought > there was > > >>> more > > >>> than a days work there) but kudos if you can accomplish it. > I'll > be > > >>> working this week on a piece of code to handle new connection > > >>> requests > > >>> on a UAS. If you are interested in the code once I get it > polished, > > >>> I'll happily hand it over. I borrowed the design idea from > Simon > > >>> Foster's "Forwarding and Redirecting Network Ports" section > 13.13 > > >>> of the > > >>> "Python Cookbook", O'Reilly publishing. > > >> > > >> All the days are just estimates right now. I'm meeting with the > > >> engineers this week to get their estimate. Please send me the > code > > >> you create. I'd love to see your approach. > > >> > > >>> > > >>> In the future, you may also use your recorder on SIP > messaging by > > >>> redirecting your instant messenger to TestMaker as a proxy. > This > > >>> kinda > > >>> opens up a whole new realm of possibilities here as well... > > >> > > >> Totally agree with you on this. The proxy would easily > extended to > > >> record SIP sessions and create test cases. > > >> > > >>> > > >>> Thanks for the terrific work, Frank. If I come up with more > > >>> commentary, > > >>> I'll pass it along. > > >>> > > >>> -Kyle > > >>> > > >>> > > >>> On Wed, 2006-11-22 at 17:08 -0800, Frank Cohen wrote: > > >>>> Work on TestMaker 5 continues. I wrote up a specification of > the > > >>>> remaining projects to complete. I expect PushToTest will > fund the > > >>>> development of the projects in this specification. I would love > to > > >>>> hear your feedback, suggestions, and prioritization. > > >>>> > > >>>> Download the TestMaker 5 completion specification document at: > > >>>> http://downloads.pushtotest.com/tm5/TM5_Specification.pdf > > >>>> > > >>>> The document is 444K in Adobe Acrobat format. Please post your > > >>>> feedback to this list. > > >>>> > > >>>> Thanks. > > >>>> > > >>>> -Frank > > >>>> > > >>>> -- > > >>>> Frank Cohen, PushToTest, http://www.PushToTest.com, phone > 408 374 > > >>>> 7426 > > >>>> Enterprise test automation solutions to check and monitor Web- > > >>>> enabled > > >>>> applications for functionality, scalability and reliability. > > >>>> > > >>>> > > >>>> > > >>>> _______________________________________________ > > >>>> Users mailing list > > >>>> Users@lists.pushtotest.com > > >>>> http://lists.pushtotest.com/mailman/listinfo/users > > >>>> > > >>> > > >>> _______________________________________________ > > >>> Users mailing list > > >>> Users@lists.pushtotest.com > > >>> http://lists.pushtotest.com/mailman/listinfo/users > > >>> > > >> > > >> _______________________________________________ > > >> Users mailing list > > >> Users@lists.pushtotest.com > > >> http://lists.pushtotest.com/mailman/listinfo/users > > > > > > _______________________________________________ > > > Users mailing list > > > Users@lists.pushtotest.com > > > http://lists.pushtotest.com/mailman/listinfo/users > > > > > > > _______________________________________________ > > Users mailing list > > Users@lists.pushtotest.com > > http://lists.pushtotest.com/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users From fcohen at pushtotest.com Tue Jan 2 21:32:17 2007 From: fcohen at pushtotest.com (Frank Cohen) Date: Tue Jan 2 22:35:49 2007 Subject: [ptt-users] Re: TestMaker memory problems In-Reply-To: <573704.78585.qm@web38215.mail.mud.yahoo.com> References: <573704.78585.qm@web38215.mail.mud.yahoo.com> Message-ID: Hmmm... the URLlist was originally intended to help users debug Web services that use HTTP redirect commands. The idea is getURLlist() would show a list of the URLs that were redirected after an HTTPProtocol connect() method. I think the best solution to avoid the Out Of Memory problems in XSTest is to modify agentbase.py to call the HTTPProtocol clearURLlist () method in the config() method. That way the list is reset each time the test's setUp() method is called. This is an easy change so I'll add it to the TestMaker 4.4.1 maintenance release. Please let me know your comments, feedback, ideas. Thanks Carl for pointing out this problem. -Frank On Dec 28, 2006, at 10:52 AM, Carl Herder wrote: > Long running xstest loads run out of memory. It is not technically > a memory leak. In com.pushtotest.tool.protocolhandler.HTTPprotocol > there is a Vector URLlist that grows constantly during the run. The > connect() method appends the URL for every request to this Vector. > An instance is created for each CVU. As far as I can see, this list > is not used for anything (HTTPSprotocol uses it for redirected > URLs, which are printed out at the end). > > I commented out > > URLlist.addElement( con.getURL() ); > > and the memory problem goes away. I have been running now for 18 > hours, with 200 CVUs, and heap memory is stable. > > Plug for the Wily Leakhunter tool (disclosure--I work for the > company), which pointed me immediately to the offending List. > > Carl > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com From carl_herder at yahoo.com Wed Jan 3 10:38:04 2007 From: carl_herder at yahoo.com (Carl Herder) Date: Wed Jan 3 11:41:15 2007 Subject: [ptt-users] Re: TestMaker memory problems In-Reply-To: Message-ID: <643776.45170.qm@web38215.mail.mud.yahoo.com> My thoughts: 1. The initial URL is appended to the list, whether or not we indicate to follow redirects, every time connect() is called. We should use this list only if we are following redirects. 2. It might be best to separate the debugging function from simply following redirects. Debugging is generally for short runs. We might want to run a workload for a long period that includes redirection. 3. This may be an unfounded concern, but the way clerURLlist() is coded MAY cause a memory leak, by leaving a lot of Vectors in the heap for GC to take care of. I suggest something like this: public void clearURLlist() { if (URLlist != null) { URLlist.removeAllElements(); } else { URLlist = new Vector(); } } 4. Suggestion: Could the URLlist be processed and reinitialized as soon as we leave the redirection while loop in connect()? Thanks, Carl Frank Cohen wrote: Hmmm... the URLlist was originally intended to help users debug Web services that use HTTP redirect commands. The idea is getURLlist() would show a list of the URLs that were redirected after an HTTPProtocol connect() method. I think the best solution to avoid the Out Of Memory problems in XSTest is to modify agentbase.py to call the HTTPProtocol clearURLlist () method in the config() method. That way the list is reset each time the test's setUp() method is called. This is an easy change so I'll add it to the TestMaker 4.4.1 maintenance release. Please let me know your comments, feedback, ideas. Thanks Carl for pointing out this problem. -Frank On Dec 28, 2006, at 10:52 AM, Carl Herder wrote: > Long running xstest loads run out of memory. It is not technically > a memory leak. In com.pushtotest.tool.protocolhandler.HTTPprotocol > there is a Vector URLlist that grows constantly during the run. The > connect() method appends the URL for every request to this Vector. > An instance is created for each CVU. As far as I can see, this list > is not used for anything (HTTPSprotocol uses it for redirected > URLs, which are printed out at the end). > > I commented out > > URLlist.addElement( con.getURL() ); > > and the memory problem goes away. I have been running now for 18 > hours, with 200 CVUs, and heap memory is stable. > > Plug for the Wily Leakhunter tool (disclosure--I work for the > company), which pointed me immediately to the offending List. > > Carl > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com _______________________________________________ Users mailing list Users@lists.pushtotest.com http://lists.pushtotest.com/mailman/listinfo/users __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://cake.pushtotest.com/pipermail/users/attachments/20070103/01bb77d6/attachment.htm From fcohen at pushtotest.com Wed Jan 3 11:04:30 2007 From: fcohen at pushtotest.com (Frank Cohen) Date: Wed Jan 3 12:07:42 2007 Subject: [ptt-users] Re: TestMaker memory problems In-Reply-To: <643776.45170.qm@web38215.mail.mud.yahoo.com> References: <643776.45170.qm@web38215.mail.mud.yahoo.com> Message-ID: Hi Carl: Excellent thoughts. See below. -Frank On Jan 3, 2007, at 10:38 AM, Carl Herder wrote: > My thoughts: > > 1. The initial URL is appended to the list, whether or not we > indicate to follow redirects, every time connect() is called. We > should use this list only if we are following redirects. I'm a little hesitant from reducing default functionality. I haven't anything from other users how they are using the URLlist. So for now I'd like to leave it as the default behavior, and maybe later have it only used when connect(1) is used to automatically follow redirects. > 2. It might be best to separate the debugging function from simply > following redirects. Debugging is generally for short runs. We > might want to run a workload for a long period that includes > redirection. The change I proposed will clear the URL list each time the TestCase runs its runTest method. > > 3. This may be an unfounded concern, but the way clerURLlist() is > coded MAY cause a memory leak, by leaving a lot of Vectors in the > heap for GC to take care of. I suggest something like this: > > public void clearURLlist() > { > if (URLlist != null) { > URLlist.removeAllElements(); > } else { > URLlist = new Vector(); > } > } GC in Java 1.4 and later has gotten really very good, so I'm not that concerned. I'm happy to change the code as you described above and will do so without anyone's objection. > > 4. Suggestion: Could the URLlist be processed and reinitialized as > soon as we leave the redirection while loop in connect()? I'm not sure I understand the suggestion. However, you can add the call to clearURLlist to a test script pretty much anywhere you want. > > Thanks, > Carl > > > Frank Cohen wrote: > Hmmm... the URLlist was originally intended to help users debug Web > services that use HTTP redirect commands. The idea is getURLlist() > would show a list of the URLs that were redirected after an > HTTPProtocol connect() method. > > I think the best solution to avoid the Out Of Memory problems in > XSTest is to modify agentbase.py to call the HTTPProtocol clearURLlist > () method in the config() method. That way the list is reset each > time the test's setUp() method is called. > > This is an easy change so I'll add it to the TestMaker 4.4.1 > maintenance release. Please let me know your comments, feedback, > ideas. > > Thanks Carl for pointing out this problem. > > -Frank > > > > > > > > On Dec 28, 2006, at 10:52 AM, Carl Herder wrote: > > > Long running xstest loads run out of memory. It is not technically > > a memory leak. In com.pushtotest.tool.protocolhandler.HTTPprotocol > > there is a Vector URLlist that grows constantly during the run. The > > connect() method appends the URL for every request to this Vector. > > An instance is created for each CVU. As far as I can see, this list > > is not used for anything (HTTPSprotocol uses it for redirected > > URLs, which are printed out at the end). > > > > I commented out > > > > URLlist.addElement( con.getURL() ); > > > > and the memory problem goes away. I have been running now for 18 > > hours, with 200 CVUs, and heap memory is stable. > > > > Plug for the Wily Leakhunter tool (disclosure--I work for the > > company), which pointed me immediately to the offending List. > > > > Carl > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users From carl_herder at yahoo.com Wed Jan 3 16:00:29 2007 From: carl_herder at yahoo.com (Carl Herder) Date: Wed Jan 3 17:03:51 2007 Subject: [ptt-users] Matching return codes In-Reply-To: Message-ID: <296737.33097.qm@web38202.mail.mud.yahoo.com> I have just discovered that this line in agentbase.py is not working: TestCase.assert( self.errMsg(), re.match( self.codes, self.response.getResponseCode().toString() ) is not None ) ...because the string of okay return codes '[20.,300,301,302,303,304,307,401,403,404,408,41.]' Does not work as a regular expression. My quick and dirty workaround is to take away the brackets and periods in properties.py: '200,300,301,302,303,304,307,401,403,404,408,410' Initialize self.codes in agentbase.py like this: self.codes = successcodes.split(',') and replace the assert with: try: self.codes.index(self.response.getResponseCode().toString()) except: self.errMsg() Carl __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://cake.pushtotest.com/pipermail/users/attachments/20070103/ddefe6d9/attachment.htm From kylebell at tango-networks.com Wed Jan 3 17:07:25 2007 From: kylebell at tango-networks.com (Kyle Bell) Date: Wed Jan 3 18:10:38 2007 Subject: [ptt-users] Matching return codes In-Reply-To: <296737.33097.qm@web38202.mail.mud.yahoo.com> References: <296737.33097.qm@web38202.mail.mud.yahoo.com> Message-ID: <1167872845.14550.37.camel@kbell-1.tango-networks.com> Interesting... The list of success codes that are a part of the template that my version of test maker generates is the following string: '20.|300|301|302|303|304|307|401|403|408|41.' which is a regexp implying any 20x response or 300 response or 301 response, etcetera. What code do you have which uses your list of return codes? I am running TestMaker 4.4 and the template I use is generated by selecting using the browser recorder functionality. -Kyle On Wed, 2007-01-03 at 16:00 -0800, Carl Herder wrote: > I have just discovered that this line in agentbase.py is not working: > > TestCase.assert( self.errMsg(), re.match( self.codes, > self.response.getResponseCode().toString() ) is not None ) > > ...because the string of okay return codes > > '[20.,300,301,302,303,304,307,401,403,404,408,41.]' > > Does not work as a regular expression. > > My quick and dirty workaround is to take away the brackets and periods > in properties.py: > > '200,300,301,302,303,304,307,401,403,404,408,410' > > Initialize self.codes in agentbase.py like this: > > self.codes = successcodes.split(',') > > and replace the assert with: > > try: > self.codes.index(self.response.getResponseCode > ().toString()) > except: > self.errMsg() > > Carl > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users From carl_herder at yahoo.com Wed Jan 3 18:21:05 2007 From: carl_herder at yahoo.com (Carl Herder) Date: Wed Jan 3 19:24:18 2007 Subject: [ptt-users] Matching return codes In-Reply-To: <1167872845.14550.37.camel@kbell-1.tango-networks.com> Message-ID: <178155.135.qm@web38214.mail.mud.yahoo.com> I think the template you are referring to is the agent script, right? This is the successcodes string that is used in the "main method" of the agent script. The string I pasted into my email is from properties.py, which controls XSTest runs. I tried using '20.|300|301|302|303|304|307|401|403|408|41.' in the re.match() call in the assert statement as well. It didn't work either. BTW: some of these success codes do not indicate what I would call success. Carl Kyle Bell wrote: Interesting... The list of success codes that are a part of the template that my version of test maker generates is the following string: '20.|300|301|302|303|304|307|401|403|408|41.' which is a regexp implying any 20x response or 300 response or 301 response, etcetera. What code do you have which uses your list of return codes? I am running TestMaker 4.4 and the template I use is generated by selecting using the browser recorder functionality. -Kyle On Wed, 2007-01-03 at 16:00 -0800, Carl Herder wrote: > I have just discovered that this line in agentbase.py is not working: > > TestCase.assert( self.errMsg(), re.match( self.codes, > self.response.getResponseCode().toString() ) is not None ) > > ...because the string of okay return codes > > '[20.,300,301,302,303,304,307,401,403,404,408,41.]' > > Does not work as a regular expression. > > My quick and dirty workaround is to take away the brackets and periods > in properties.py: > > '200,300,301,302,303,304,307,401,403,404,408,410' > > Initialize self.codes in agentbase.py like this: > > self.codes = successcodes.split(',') > > and replace the assert with: > > try: > self.codes.index(self.response.getResponseCode > ().toString()) > except: > self.errMsg() > > Carl > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users _______________________________________________ Users mailing list Users@lists.pushtotest.com http://lists.pushtotest.com/mailman/listinfo/users __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://cake.pushtotest.com/pipermail/users/attachments/20070103/00f38b27/attachment.htm From Geoff.Thieme at we-energies.com Fri Jan 5 12:40:44 2007 From: Geoff.Thieme at we-energies.com (Thieme.Geoff) Date: Fri Jan 5 13:44:36 2007 Subject: [ptt-users] get and post together Message-ID: <504E91721C7F7E40BC6735C0DA9130BC019BFC0E@mlxdpm3w3.we.dirsrv.com> I needed to do a self.get and self.post at the same time to a web page (needed to post data and add ?url=actionAddPaymentRequest to the url). I couldn't find this covered in the documentation anywhere. When I recorded my functional test using the proxy server, it did not create a working functional test. The results from recording were: self.params = [ [ '''url''', '''startWePaymentRequest''' ],[ '''form1''', data1 ],[ '''form2''', data2 ] ] self.get( '''http://server/HttpController''', self.params) self.params = [ [ '''url''', '''actionAddPaymentRequest''' ],[ '''form1''', data1 ],[ '''form2''', data2 ] ] self.post( '''http://server/HttpController''', self.params) My app uses the servlet named HttpController to do most of the work. You pass ?url=pagename to tell HttpController what to do (e.g. https://server/HttpController?url=startWePaymentRequest). When I ran the code above, the results were that startWePaymentRequest got loaded twice and actionAddPaymentRequest never get loaded. Here were my changes to get the test to work: self.params = [ [ '''url''', '''startWePaymentRequest''' ],[ '''form1''', data1 ],[ '''form2''', data2 ] ] self.get( '''http://server/HttpController''', self.params) # Set the get params for the next post by first sending them to a dummy page self.params = [ [ '''url''', '''actionAddPaymentRequest''' ] ] self.get( '''http://server/images/calendar.gif''', self.params) self.params = [ [ '''form1''', data1 ],[ '''form2''', data2 ] ] self.post( '''http://server/HttpController''', self.params) By loading calendar.gif with url=actionAddPaymentRequest as the get param, something in the self object must get setup. This setup is then used by the next self.post to send ?url=actionAddPaymentRequest in the url and load the correct page. This was tricky to figure out, but it is a work-around that allows running a functional test with my app. Hopefully this will be useful to someone it the future. -Geoff Thieme -------------- next part -------------- An HTML attachment was scrubbed... URL: http://cake.pushtotest.com/pipermail/users/attachments/20070105/e088df0a/attachment.htm From fcohen at pushtotest.com Sat Jan 6 08:21:45 2007 From: fcohen at pushtotest.com (Frank Cohen) Date: Sat Jan 6 09:25:46 2007 Subject: [ptt-users] omission in post parameters In-Reply-To: References: Message-ID: <03CB1198-4FE1-44BC-8289-96D603EF6BFC@pushtotest.com> Hi Geoff: These changes look good. I'm incorporating them into the TestMaker 4.4.1 maintenance release. I'm working on that this weekend and hopefully will post a "beta" build for everyone to checkout in a couple of days. On behalf of the TM community thank you very much for your contribution. -Frank On Dec 4, 2006, at 5:59 AM, Geoff Meakin wrote: > Hi Frank, > > > > I have solved my problem by tweaking an agentbase function and a > tool java class and include the code below- feel free to add it > into the source if you feel its appropriate (personally I think > it?s a really useful thing to be able to do). > > > > It now allows you to control the content type of a http-post, and > also post a pure value as well as key=value. > > > > In agentbase.py, post now reads: > > > > def post( self, url, params=None, contenttype='application/x- > www-form-urlencoded' ): > > > > And after setting the protocol I do: > > > > try: > > self.body.setContentType(contenttype) > > except: > > print "Unexpected error:", sys.exc_info()[0] > > self.body.setContentType(contenttype) > > > > And I have modified com/pushtotest/tool/protocolhandler/ > HTTPBody.java as follows: > > > > In the class declaration: > > > > private String contenttype = "application/x-www-form-urlencoded"; > > > > Modified addHeaders() method: > > > > public void addHeaders( HttpURLConnection con ) { > > con.setRequestProperty("Content-Type", contenttype); > > } > > > > New method: setContentType: > > > > public void setContentType( String newtype ) > > { > > contenttype=newtype; > > } > > > > Finally I have modified the method paramsAsString() as follows: > > > > ?.. > > for (int i=0; i < size; i++) { > > nkv = (keyvalue) params.elementAt( i ); > > > > String key = nkv.getKey(); > > String value = nkv.getValue(); > > > > if (key.length()==0) { > > buffer.append(value); > > } else { > > buffer.append(key).append("=").append(value); > > } > > > > Cheers > > -Geoff > > > > From: users-bounces@lists.pushtotest.com [mailto:users- > bounces@lists.pushtotest.com] On Behalf Of Geoff Meakin > Sent: 01 December 2006 10:59 > To: TestMaker users list; users@lists.pushtotest.com > Subject: RE: [ptt-users] omission in post parameters > > > > Hi, > > I have just read the w3c recs and spec, and note that basically you > can POST what you like as part of a POST request, but what is legal > depends on the Content-Type header declaration. > > Therefore for a application/x-www-form-urlencoded they do indeed > have to be key/value pairs, encoded properly. > > Therefore in this respect my application under test breaks the w3c > recs (nice) > > However, we are now modifying the Content-Type to text/xml, which > allows you to POST just xml. > > How would I do this in testmaker please? > > I.e. come up with something that looks like this: > > POST /url HTTP/1.1 > Host: foo.bar.com > Content-Type: text/xml > ..... more headers ..... > > > > > Thanks > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com on behalf of > Mark.Lutton@thomson.com > Sent: Thu 30/11/2006 18:55 > To: users@lists.pushtotest.com > Subject: FW: [ptt-users] omission in post parameters > > I don't think it is meaningful to have a single value without a > key. Here is an example of a POST request, which I got from http:// > www.jmarshall.com/easy/html/ : > > POST /path/script.cgi HTTP/1.0 > From: frog@jmarshall.com > User-Agent: HTTPTool/1.0 > Content-Type: application/x-www-form-urlencoded > Content-Length: 32 > > home=Cosby&favorite+flavor=flies > > You could also do this in the URL by putting the parameters into > the query: > > http://hostname.com/path/script.cgi?home=Cosby&favorite+flavor=flies > > But I don't know what the following means: > > http://hostname.com/path/script.cgi?Cosby > > Likewise: > > POST /path/script.cgi HTTP/1.0 > From: frog@jmarshall.com > User-Agent: HTTPTool/1.0 > Content-Type: application/x-www-form-urlencoded > Content-Length: 5 > > Cosby > > > In both cases Cosby looks like the key, not the value. On the > server side, what would ServletRequest.getParameterMap() return? > > A parameter value can be an array of strings; a single string is > equivalent to an array containing one string. Is this what you are > thinking of? I don't know the syntax for an array of values but I > guess it would be like this: > > self.params=[ [ '''key''', [ '''value1''', '''value2''', > '''value3''' ] ] ] > > So the following two would be equivalent: > > self.params= [ [ '''key''', [ '''value''' ] ] ] > > self.params= [ [ '''key''', '''value''' ] ] > > > Mark Lutton > Business Intelligence Services, a Thomson Business > > > ________________________________ > > From: users-bounces@lists.pushtotest.com on behalf of Geoff Meakin > Sent: Thu 11/30/2006 12:59 PM > To: TestMaker users list > Subject: [ptt-users] omission in post parameters > > > > Hi all, > > Does anyone know how to post a singleton parameter > > Normally: > > self.params= [ [ '''key''', '''value''' ] ] > self.post(url) > > However it should be possibly to also post: > > self.params= [ [ '''value''' ] ] > self.post(url) > > but doing this leads to an index out of bounds. > > I've checked HTTPBody.java and it DOES NOT have a method: > addParameter(String value) > > If anyone can help with how to do this, it would be gratefully > appreciated! > Or indeed any other thoughts... am a bit stuck out here! > > Cheers > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com > [mailto:users-bounces@lists.pushtotest.com] On Behalf Of Kyle Bell > Sent: 30 November 2006 15:40 > To: TestMaker users list > Subject: Re: [ptt-users] TestMaker 5 completion specification > > Frank, > > I know you were looking for some example code associated with SIP > enabled instant messaging clients. Follow the link below and click on > the Sip Communicator. This is a NIST sponsored IM and telephony > client. > > http://snad.ncsl.nist.gov/proj/iptel/ > > Regards, > > -Kyle > > On Wed, 2006-11-29 at 08:03 -0800, Frank Cohen wrote: > > That explains it. :-( Oh well. Thanks for finding this. I'll see > what > > > I can do when I write the TM 5 build scripts. Maybe I'll write my > own > > > zip handler. -Frank > > > > > > On Nov 29, 2006, at 7:42 AM, Kyle Bell wrote: > > > > > Frank, > > > > > > I found this tidbit from the ant user manual -> core tasks -> zip: > > > > > > Starting with Ant 1.5.2, can store Unix permissions > inside the > > > archive (see description of the filemode and dirmode attributes > for > > > ). Unfortunately there is no portable way to store > these > > > permissions. Ant uses the algorithm used by Info-Zip's > > > implementation of > > > the zip and unzip commands - these are the default versions of zip > and > > > unzip for many Unix and Unix-like systems. > > > > > > > > > Please note that the zip format allows multiple files of the same > > > fully- > > > qualified name to exist within a single archive. This has been > > > documented as causing various problems for unsuspecting users. If > you > > > wish to avoid this behavior you must set the duplicate > attribute to > a > > > value other than its default, "add". > > > > > > This likely explains your issue. The options available for the > > > duplicate attribute are as follows: > > > > > > duplicate -> behavior when a duplicate file is found. Valid values > are > > > "add", "preserve", and "fail". The default value is "add". > > > > > > In your zip task you may try specifying "preserve" as the value > rather > > > than the default of "add" and see where that takes you... > > > > > > Hope this helps... > > > > > > -Kyle > > > > > > > > > > > > On Mon, 2006-11-27 at 10:52 -0800, Frank Cohen wrote: > > >> Hi Kyle: Thanks for the feedback. See below. -Frank > > >> On Nov 27, 2006, at 9:41 AM, Kyle Bell wrote: > > >> > > >>> Frank, > > >>> > > >>> Nice feature list. I especially appreciate the first new > feature > > > >>> idea > > >>> by Bongos Amigos. I've not spent any time finding a good use > for > > >>> those > > >>> generated XML files and this would make them immediately > useful... > > >> > > >> Attached is an example TestScenario XML file. I'd love > feedback on > > > >> it. > > >> > > >>> Another enhancement or bug as it may be seen that I'd like to > see > > >>> addressed is the ability to kill a running TestCase from the > > >>> TestMaker > > >>> IDE which is not being controlled by XSTest. If a test case is > > >>> running > > >>> within the browser (perhaps it was written to run in an infinite > > >>> loop > > >>> correctly or by accident), I've not found a way to kill this > running > > >>> process as the "stop the agent" button appears not to be > effective. > > >> > > >> Interesting. When you click the stop button TestMaker kills the > > >> thread running the script. That's not a very nice way to do > it, but > > >> it's something necessary. I suppose another way would be to > have a > > >> signal to the running test case to stop. I'll give this some > thought. > > >> Thanks for making me aware of the problem. > > >> > > >> > > >> > > >>> Also, could I get you to make a small change to your ANT script > > >>> which > > >>> packages your distribution? I had previously suggested (and you > > >>> implemented) a change to make the permissions 755 on > TestMaker.sh > > > >>> when > > >>> you perform your packaging. Could I talk you into doing the > same > > > >>> with > > >>> TestMaker.bat? I also run TestMaker in some Windows systems > and I > > >>> find > > >>> myself doing this within a cygwin environment as well. Cygwin > > >>> requires > > >>> executable permissions on batch files for execution purposes and > > >>> this > > >>> would prevent the step of changing permissions for other > TestMaker > > >>> users > > >>> running in this environment. > > >> > > >> I'm ok with making that change. > > >> > > >> Maybe you can help me with a different problem. The way the > build.xml > > >> script is written now, the .sh files are correctly set with > the 755 > > >> permissions, but the resulting Zip file has two copies of the .sh > > >> files. It's totally weird to me to see WinZip on Windows ask > if it > > >> can overwrite the .sh files. Any idea what I'm doing wrong? > > >> > > >> > > >>> > > >>> Since you included my suggestion for a SIP UAC/UAS I now wish I > had > > >>> edited it a little more closely... :o) I'm unsure how you plan > to > > >>> implement this feature in a single day (I rather thought > there was > > >>> more > > >>> than a days work there) but kudos if you can accomplish it. > I'll > be > > >>> working this week on a piece of code to handle new connection > > >>> requests > > >>> on a UAS. If you are interested in the code once I get it > polished, > > >>> I'll happily hand it over. I borrowed the design idea from > Simon > > >>> Foster's "Forwarding and Redirecting Network Ports" section > 13.13 > > >>> of the > > >>> "Python Cookbook", O'Reilly publishing. > > >> > > >> All the days are just estimates right now. I'm meeting with the > > >> engineers this week to get their estimate. Please send me the > code > > >> you create. I'd love to see your approach. > > >> > > >>> > > >>> In the future, you may also use your recorder on SIP > messaging by > > >>> redirecting your instant messenger to TestMaker as a proxy. > This > > >>> kinda > > >>> opens up a whole new realm of possibilities here as well... > > >> > > >> Totally agree with you on this. The proxy would easily > extended to > > >> record SIP sessions and create test cases. > > >> > > >>> > > >>> Thanks for the terrific work, Frank. If I come up with more > > >>> commentary, > > >>> I'll pass it along. > > >>> > > >>> -Kyle > > >>> > > >>> > > >>> On Wed, 2006-11-22 at 17:08 -0800, Frank Cohen wrote: > > >>>> Work on TestMaker 5 continues. I wrote up a specification of > the > > >>>> remaining projects to complete. I expect PushToTest will > fund the > > >>>> development of the projects in this specification. I would love > to > > >>>> hear your feedback, suggestions, and prioritization. > > >>>> > > >>>> Download the TestMaker 5 completion specification document at: > > >>>> http://downloads.pushtotest.com/tm5/TM5_Specification.pdf > > >>>> > > >>>> The document is 444K in Adobe Acrobat format. Please post your > > >>>> feedback to this list. > > >>>> > > >>>> Thanks. > > >>>> > > >>>> -Frank > > >>>> > > >>>> -- > > >>>> Frank Cohen, PushToTest, http://www.PushToTest.com, phone > 408 374 > > >>>> 7426 > > >>>> Enterprise test automation solutions to check and monitor Web- > > >>>> enabled > > >>>> applications for functionality, scalability and reliability. > > >>>> > > >>>> > > >>>> > > >>>> _______________________________________________ > > >>>> Users mailing list > > >>>> Users@lists.pushtotest.com > > >>>> http://lists.pushtotest.com/mailman/listinfo/users > > >>>> > > >>> > > >>> _______________________________________________ > > >>> Users mailing list > > >>> Users@lists.pushtotest.com > > >>> http://lists.pushtotest.com/mailman/listinfo/users > > >>> > > >> > > >> _______________________________________________ > > >> Users mailing list > > >> Users@lists.pushtotest.com > > >> http://lists.pushtotest.com/mailman/listinfo/users > > > > > > _______________________________________________ > > > Users mailing list > > > Users@lists.pushtotest.com > > > http://lists.pushtotest.com/mailman/listinfo/users > > > > > > > _______________________________________________ > > Users mailing list > > Users@lists.pushtotest.com > > http://lists.pushtotest.com/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users From fcohen at pushtotest.com Sat Jan 6 08:46:33 2007 From: fcohen at pushtotest.com (Frank Cohen) Date: Sat Jan 6 10:02:24 2007 Subject: [ptt-users] omission in post parameters In-Reply-To: References: Message-ID: <4BBD0DB3-E2E4-4740-BFC1-DDE8A9E72DF5@pushtotest.com> Hi Geoff: I'm curious about the following: > try: > > self.body.setContentType(contenttype) > > except: > > print "Unexpected error:", sys.exc_info()[0] > > self.body.setContentType(contenttype) So if you get an exception while setting the content type, the code prints the error, and then tries to set the content type again? -Frank On Dec 4, 2006, at 5:59 AM, Geoff Meakin wrote: > Hi Frank, > > > > I have solved my problem by tweaking an agentbase function and a > tool java class and include the code below- feel free to add it > into the source if you feel its appropriate (personally I think > it?s a really useful thing to be able to do). > > > > It now allows you to control the content type of a http-post, and > also post a pure value as well as key=value. > > > > In agentbase.py, post now reads: > > > > def post( self, url, params=None, contenttype='application/x- > www-form-urlencoded' ): > > > > And after setting the protocol I do: > > > > try: > > self.body.setContentType(contenttype) > > except: > > print "Unexpected error:", sys.exc_info()[0] > > self.body.setContentType(contenttype) > > > > And I have modified com/pushtotest/tool/protocolhandler/ > HTTPBody.java as follows: > > > > In the class declaration: > > > > private String contenttype = "application/x-www-form-urlencoded"; > > > > Modified addHeaders() method: > > > > public void addHeaders( HttpURLConnection con ) { > > con.setRequestProperty("Content-Type", contenttype); > > } > > > > New method: setContentType: > > > > public void setContentType( String newtype ) > > { > > contenttype=newtype; > > } > > > > Finally I have modified the method paramsAsString() as follows: > > > > ?.. > > for (int i=0; i < size; i++) { > > nkv = (keyvalue) params.elementAt( i ); > > > > String key = nkv.getKey(); > > String value = nkv.getValue(); > > > > if (key.length()==0) { > > buffer.append(value); > > } else { > > buffer.append(key).append("=").append(value); > > } > > > > Cheers > > -Geoff > > > > From: users-bounces@lists.pushtotest.com [mailto:users- > bounces@lists.pushtotest.com] On Behalf Of Geoff Meakin > Sent: 01 December 2006 10:59 > To: TestMaker users list; users@lists.pushtotest.com > Subject: RE: [ptt-users] omission in post parameters > > > > Hi, > > I have just read the w3c recs and spec, and note that basically you > can POST what you like as part of a POST request, but what is legal > depends on the Content-Type header declaration. > > Therefore for a application/x-www-form-urlencoded they do indeed > have to be key/value pairs, encoded properly. > > Therefore in this respect my application under test breaks the w3c > recs (nice) > > However, we are now modifying the Content-Type to text/xml, which > allows you to POST just xml. > > How would I do this in testmaker please? > > I.e. come up with something that looks like this: > > POST /url HTTP/1.1 > Host: foo.bar.com > Content-Type: text/xml > ..... more headers ..... > > > > > Thanks > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com on behalf of > Mark.Lutton@thomson.com > Sent: Thu 30/11/2006 18:55 > To: users@lists.pushtotest.com > Subject: FW: [ptt-users] omission in post parameters > > I don't think it is meaningful to have a single value without a > key. Here is an example of a POST request, which I got from http:// > www.jmarshall.com/easy/html/ : > > POST /path/script.cgi HTTP/1.0 > From: frog@jmarshall.com > User-Agent: HTTPTool/1.0 > Content-Type: application/x-www-form-urlencoded > Content-Length: 32 > > home=Cosby&favorite+flavor=flies > > You could also do this in the URL by putting the parameters into > the query: > > http://hostname.com/path/script.cgi?home=Cosby&favorite+flavor=flies > > But I don't know what the following means: > > http://hostname.com/path/script.cgi?Cosby > > Likewise: > > POST /path/script.cgi HTTP/1.0 > From: frog@jmarshall.com > User-Agent: HTTPTool/1.0 > Content-Type: application/x-www-form-urlencoded > Content-Length: 5 > > Cosby > > > In both cases Cosby looks like the key, not the value. On the > server side, what would ServletRequest.getParameterMap() return? > > A parameter value can be an array of strings; a single string is > equivalent to an array containing one string. Is this what you are > thinking of? I don't know the syntax for an array of values but I > guess it would be like this: > > self.params=[ [ '''key''', [ '''value1''', '''value2''', > '''value3''' ] ] ] > > So the following two would be equivalent: > > self.params= [ [ '''key''', [ '''value''' ] ] ] > > self.params= [ [ '''key''', '''value''' ] ] > > > Mark Lutton > Business Intelligence Services, a Thomson Business > > > ________________________________ > > From: users-bounces@lists.pushtotest.com on behalf of Geoff Meakin > Sent: Thu 11/30/2006 12:59 PM > To: TestMaker users list > Subject: [ptt-users] omission in post parameters > > > > Hi all, > > Does anyone know how to post a singleton parameter > > Normally: > > self.params= [ [ '''key''', '''value''' ] ] > self.post(url) > > However it should be possibly to also post: > > self.params= [ [ '''value''' ] ] > self.post(url) > > but doing this leads to an index out of bounds. > > I've checked HTTPBody.java and it DOES NOT have a method: > addParameter(String value) > > If anyone can help with how to do this, it would be gratefully > appreciated! > Or indeed any other thoughts... am a bit stuck out here! > > Cheers > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com > [mailto:users-bounces@lists.pushtotest.com] On Behalf Of Kyle Bell > Sent: 30 November 2006 15:40 > To: TestMaker users list > Subject: Re: [ptt-users] TestMaker 5 completion specification > > Frank, > > I know you were looking for some example code associated with SIP > enabled instant messaging clients. Follow the link below and click on > the Sip Communicator. This is a NIST sponsored IM and telephony > client. > > http://snad.ncsl.nist.gov/proj/iptel/ > > Regards, > > -Kyle > > On Wed, 2006-11-29 at 08:03 -0800, Frank Cohen wrote: > > That explains it. :-( Oh well. Thanks for finding this. I'll see > what > > > I can do when I write the TM 5 build scripts. Maybe I'll write my > own > > > zip handler. -Frank > > > > > > On Nov 29, 2006, at 7:42 AM, Kyle Bell wrote: > > > > > Frank, > > > > > > I found this tidbit from the ant user manual -> core tasks -> zip: > > > > > > Starting with Ant 1.5.2, can store Unix permissions > inside the > > > archive (see description of the filemode and dirmode attributes > for > > > ). Unfortunately there is no portable way to store > these > > > permissions. Ant uses the algorithm used by Info-Zip's > > > implementation of > > > the zip and unzip commands - these are the default versions of zip > and > > > unzip for many Unix and Unix-like systems. > > > > > > > > > Please note that the zip format allows multiple files of the same > > > fully- > > > qualified name to exist within a single archive. This has been > > > documented as causing various problems for unsuspecting users. If > you > > > wish to avoid this behavior you must set the duplicate > attribute to > a > > > value other than its default, "add". > > > > > > This likely explains your issue. The options available for the > > > duplicate attribute are as follows: > > > > > > duplicate -> behavior when a duplicate file is found. Valid values > are > > > "add", "preserve", and "fail". The default value is "add". > > > > > > In your zip task you may try specifying "preserve" as the value > rather > > > than the default of "add" and see where that takes you... > > > > > > Hope this helps... > > > > > > -Kyle > > > > > > > > > > > > On Mon, 2006-11-27 at 10:52 -0800, Frank Cohen wrote: > > >> Hi Kyle: Thanks for the feedback. See below. -Frank > > >> On Nov 27, 2006, at 9:41 AM, Kyle Bell wrote: > > >> > > >>> Frank, > > >>> > > >>> Nice feature list. I especially appreciate the first new > feature > > > >>> idea > > >>> by Bongos Amigos. I've not spent any time finding a good use > for > > >>> those > > >>> generated XML files and this would make them immediately > useful... > > >> > > >> Attached is an example TestScenario XML file. I'd love > feedback on > > > >> it. > > >> > > >>> Another enhancement or bug as it may be seen that I'd like to > see > > >>> addressed is the ability to kill a running TestCase from the > > >>> TestMaker > > >>> IDE which is not being controlled by XSTest. If a test case is > > >>> running > > >>> within the browser (perhaps it was written to run in an infinite > > >>> loop > > >>> correctly or by accident), I've not found a way to kill this > running > > >>> process as the "stop the agent" button appears not to be > effective. > > >> > > >> Interesting. When you click the stop button TestMaker kills the > > >> thread running the script. That's not a very nice way to do > it, but > > >> it's something necessary. I suppose another way would be to > have a > > >> signal to the running test case to stop. I'll give this some > thought. > > >> Thanks for making me aware of the problem. > > >> > > >> > > >> > > >>> Also, could I get you to make a small change to your ANT script > > >>> which > > >>> packages your distribution? I had previously suggested (and you > > >>> implemented) a change to make the permissions 755 on > TestMaker.sh > > > >>> when > > >>> you perform your packaging. Could I talk you into doing the > same > > > >>> with > > >>> TestMaker.bat? I also run TestMaker in some Windows systems > and I > > >>> find > > >>> myself doing this within a cygwin environment as well. Cygwin > > >>> requires > > >>> executable permissions on batch files for execution purposes and > > >>> this > > >>> would prevent the step of changing permissions for other > TestMaker > > >>> users > > >>> running in this environment. > > >> > > >> I'm ok with making that change. > > >> > > >> Maybe you can help me with a different problem. The way the > build.xml > > >> script is written now, the .sh files are correctly set with > the 755 > > >> permissions, but the resulting Zip file has two copies of the .sh > > >> files. It's totally weird to me to see WinZip on Windows ask > if it > > >> can overwrite the .sh files. Any idea what I'm doing wrong? > > >> > > >> > > >>> > > >>> Since you included my suggestion for a SIP UAC/UAS I now wish I > had > > >>> edited it a little more closely... :o) I'm unsure how you plan > to > > >>> implement this feature in a single day (I rather thought > there was > > >>> more > > >>> than a days work there) but kudos if you can accomplish it. > I'll > be > > >>> working this week on a piece of code to handle new connection > > >>> requests > > >>> on a UAS. If you are interested in the code once I get it > polished, > > >>> I'll happily hand it over. I borrowed the design idea from > Simon > > >>> Foster's "Forwarding and Redirecting Network Ports" section > 13.13 > > >>> of the > > >>> "Python Cookbook", O'Reilly publishing. > > >> > > >> All the days are just estimates right now. I'm meeting with the > > >> engineers this week to get their estimate. Please send me the > code > > >> you create. I'd love to see your approach. > > >> > > >>> > > >>> In the future, you may also use your recorder on SIP > messaging by > > >>> redirecting your instant messenger to TestMaker as a proxy. > This > > >>> kinda > > >>> opens up a whole new realm of possibilities here as well... > > >> > > >> Totally agree with you on this. The proxy would easily > extended to > > >> record SIP sessions and create test cases. > > >> > > >>> > > >>> Thanks for the terrific work, Frank. If I come up with more > > >>> commentary, > > >>> I'll pass it along. > > >>> > > >>> -Kyle > > >>> > > >>> > > >>> On Wed, 2006-11-22 at 17:08 -0800, Frank Cohen wrote: > > >>>> Work on TestMaker 5 continues. I wrote up a specification of > the > > >>>> remaining projects to complete. I expect PushToTest will > fund the > > >>>> development of the projects in this specification. I would love > to > > >>>> hear your feedback, suggestions, and prioritization. > > >>>> > > >>>> Download the TestMaker 5 completion specification document at: > > >>>> http://downloads.pushtotest.com/tm5/TM5_Specification.pdf > > >>>> > > >>>> The document is 444K in Adobe Acrobat format. Please post your > > >>>> feedback to this list. > > >>>> > > >>>> Thanks. > > >>>> > > >>>> -Frank > > >>>> > > >>>> -- > > >>>> Frank Cohen, PushToTest, http://www.PushToTest.com, phone > 408 374 > > >>>> 7426 > > >>>> Enterprise test automation solutions to check and monitor Web- > > >>>> enabled > > >>>> applications for functionality, scalability and reliability. > > >>>> > > >>>> > > >>>> > > >>>> _______________________________________________ > > >>>> Users mailing list > > >>>> Users@lists.pushtotest.com > > >>>> http://lists.pushtotest.com/mailman/listinfo/users > > >>>> > > >>> > > >>> _______________________________________________ > > >>> Users mailing list > > >>> Users@lists.pushtotest.com > > >>> http://lists.pushtotest.com/mailman/listinfo/users > > >>> > > >> > > >> _______________________________________________ > > >> Users mailing list > > >> Users@lists.pushtotest.com > > >> http://lists.pushtotest.com/mailman/listinfo/users > > > > > > _______________________________________________ > > > Users mailing list > > > Users@lists.pushtotest.com > > > http://lists.pushtotest.com/mailman/listinfo/users > > > > > > > _______________________________________________ > > Users mailing list > > Users@lists.pushtotest.com > > http://lists.pushtotest.com/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users From geoffm at gamesys.co.uk Sat Jan 6 11:25:02 2007 From: geoffm at gamesys.co.uk (Geoff Meakin) Date: Sat Jan 6 12:29:52 2007 Subject: [ptt-users] omission in post parameters Message-ID: Oops ! I dont know why thats there sorry! -Geoff -----Original Message----- From: users-bounces@lists.pushtotest.com on behalf of Frank Cohen Sent: Sat 06/01/2007 16:46 To: TestMaker users list Subject: Re: [ptt-users] omission in post parameters Hi Geoff: I'm curious about the following: > try: > > self.body.setContentType(contenttype) > > except: > > print "Unexpected error:", sys.exc_info()[0] > > self.body.setContentType(contenttype) So if you get an exception while setting the content type, the code prints the error, and then tries to set the content type again? -Frank On Dec 4, 2006, at 5:59 AM, Geoff Meakin wrote: > Hi Frank, > > > > I have solved my problem by tweaking an agentbase function and a > tool java class and include the code below- feel free to add it > into the source if you feel its appropriate (personally I think > it's a really useful thing to be able to do). > > > > It now allows you to control the content type of a http-post, and > also post a pure value as well as key=value. > > > > In agentbase.py, post now reads: > > > > def post( self, url, params=None, contenttype='application/x- > www-form-urlencoded' ): > > > > And after setting the protocol I do: > > > > try: > > self.body.setContentType(contenttype) > > except: > > print "Unexpected error:", sys.exc_info()[0] > > self.body.setContentType(contenttype) > > > > And I have modified com/pushtotest/tool/protocolhandler/ > HTTPBody.java as follows: > > > > In the class declaration: > > > > private String contenttype = "application/x-www-form-urlencoded"; > > > > Modified addHeaders() method: > > > > public void addHeaders( HttpURLConnection con ) { > > con.setRequestProperty("Content-Type", contenttype); > > } > > > > New method: setContentType: > > > > public void setContentType( String newtype ) > > { > > contenttype=newtype; > > } > > > > Finally I have modified the method paramsAsString() as follows: > > > > ... > > for (int i=0; i < size; i++) { > > nkv = (keyvalue) params.elementAt( i ); > > > > String key = nkv.getKey(); > > String value = nkv.getValue(); > > > > if (key.length()==0) { > > buffer.append(value); > > } else { > > buffer.append(key).append("=").append(value); > > } > > > > Cheers > > -Geoff > > > > From: users-bounces@lists.pushtotest.com [mailto:users- > bounces@lists.pushtotest.com] On Behalf Of Geoff Meakin > Sent: 01 December 2006 10:59 > To: TestMaker users list; users@lists.pushtotest.com > Subject: RE: [ptt-users] omission in post parameters > > > > Hi, > > I have just read the w3c recs and spec, and note that basically you > can POST what you like as part of a POST request, but what is legal > depends on the Content-Type header declaration. > > Therefore for a application/x-www-form-urlencoded they do indeed > have to be key/value pairs, encoded properly. > > Therefore in this respect my application under test breaks the w3c > recs (nice) > > However, we are now modifying the Content-Type to text/xml, which > allows you to POST just xml. > > How would I do this in testmaker please? > > I.e. come up with something that looks like this: > > POST /url HTTP/1.1 > Host: foo.bar.com > Content-Type: text/xml > ..... more headers ..... > > > > > Thanks > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com on behalf of > Mark.Lutton@thomson.com > Sent: Thu 30/11/2006 18:55 > To: users@lists.pushtotest.com > Subject: FW: [ptt-users] omission in post parameters > > I don't think it is meaningful to have a single value without a > key. Here is an example of a POST request, which I got from http:// > www.jmarshall.com/easy/html/ : > > POST /path/script.cgi HTTP/1.0 > From: frog@jmarshall.com > User-Agent: HTTPTool/1.0 > Content-Type: application/x-www-form-urlencoded > Content-Length: 32 > > home=Cosby&favorite+flavor=flies > > You could also do this in the URL by putting the parameters into > the query: > > http://hostname.com/path/script.cgi?home=Cosby&favorite+flavor=flies > > But I don't know what the following means: > > http://hostname.com/path/script.cgi?Cosby > > Likewise: > > POST /path/script.cgi HTTP/1.0 > From: frog@jmarshall.com > User-Agent: HTTPTool/1.0 > Content-Type: application/x-www-form-urlencoded > Content-Length: 5 > > Cosby > > > In both cases Cosby looks like the key, not the value. On the > server side, what would ServletRequest.getParameterMap() return? > > A parameter value can be an array of strings; a single string is > equivalent to an array containing one string. Is this what you are > thinking of? I don't know the syntax for an array of values but I > guess it would be like this: > > self.params=[ [ '''key''', [ '''value1''', '''value2''', > '''value3''' ] ] ] > > So the following two would be equivalent: > > self.params= [ [ '''key''', [ '''value''' ] ] ] > > self.params= [ [ '''key''', '''value''' ] ] > > > Mark Lutton > Business Intelligence Services, a Thomson Business > > > ________________________________ > > From: users-bounces@lists.pushtotest.com on behalf of Geoff Meakin > Sent: Thu 11/30/2006 12:59 PM > To: TestMaker users list > Subject: [ptt-users] omission in post parameters > > > > Hi all, > > Does anyone know how to post a singleton parameter > > Normally: > > self.params= [ [ '''key''', '''value''' ] ] > self.post(url) > > However it should be possibly to also post: > > self.params= [ [ '''value''' ] ] > self.post(url) > > but doing this leads to an index out of bounds. > > I've checked HTTPBody.java and it DOES NOT have a method: > addParameter(String value) > > If anyone can help with how to do this, it would be gratefully > appreciated! > Or indeed any other thoughts... am a bit stuck out here! > > Cheers > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com > [mailto:users-bounces@lists.pushtotest.com] On Behalf Of Kyle Bell > Sent: 30 November 2006 15:40 > To: TestMaker users list > Subject: Re: [ptt-users] TestMaker 5 completion specification > > Frank, > > I know you were looking for some example code associated with SIP > enabled instant messaging clients. Follow the link below and click on > the Sip Communicator. This is a NIST sponsored IM and telephony > client. > > http://snad.ncsl.nist.gov/proj/iptel/ > > Regards, > > -Kyle > > On Wed, 2006-11-29 at 08:03 -0800, Frank Cohen wrote: > > That explains it. :-( Oh well. Thanks for finding this. I'll see > what > > > I can do when I write the TM 5 build scripts. Maybe I'll write my > own > > > zip handler. -Frank > > > > > > On Nov 29, 2006, at 7:42 AM, Kyle Bell wrote: > > > > > Frank, > > > > > > I found this tidbit from the ant user manual -> core tasks -> zip: > > > > > > Starting with Ant 1.5.2, can store Unix permissions > inside the > > > archive (see description of the filemode and dirmode attributes > for > > > ). Unfortunately there is no portable way to store > these > > > permissions. Ant uses the algorithm used by Info-Zip's > > > implementation of > > > the zip and unzip commands - these are the default versions of zip > and > > > unzip for many Unix and Unix-like systems. > > > > > > > > > Please note that the zip format allows multiple files of the same > > > fully- > > > qualified name to exist within a single archive. This has been > > > documented as causing various problems for unsuspecting users. If > you > > > wish to avoid this behavior you must set the duplicate > attribute to > a > > > value other than its default, "add". > > > > > > This likely explains your issue. The options available for the > > > duplicate attribute are as follows: > > > > > > duplicate -> behavior when a duplicate file is found. Valid values > are > > > "add", "preserve", and "fail". The default value is "add". > > > > > > In your zip task you may try specifying "preserve" as the value > rather > > > than the default of "add" and see where that takes you... > > > > > > Hope this helps... > > > > > > -Kyle > > > > > > > > > > > > On Mon, 2006-11-27 at 10:52 -0800, Frank Cohen wrote: > > >> Hi Kyle: Thanks for the feedback. See below. -Frank > > >> On Nov 27, 2006, at 9:41 AM, Kyle Bell wrote: > > >> > > >>> Frank, > > >>> > > >>> Nice feature list. I especially appreciate the first new > feature > > > >>> idea > > >>> by Bongos Amigos. I've not spent any time finding a good use > for > > >>> those > > >>> generated XML files and this would make them immediately > useful... > > >> > > >> Attached is an example TestScenario XML file. I'd love > feedback on > > > >> it. > > >> > > >>> Another enhancement or bug as it may be seen that I'd like to > see > > >>> addressed is the ability to kill a running TestCase from the > > >>> TestMaker > > >>> IDE which is not being controlled by XSTest. If a test case is > > >>> running > > >>> within the browser (perhaps it was written to run in an infinite > > >>> loop > > >>> correctly or by accident), I've not found a way to kill this > running > > >>> process as the "stop the agent" button appears not to be > effective. > > >> > > >> Interesting. When you click the stop button TestMaker kills the > > >> thread running the script. That's not a very nice way to do > it, but > > >> it's something necessary. I suppose another way would be to > have a > > >> signal to the running test case to stop. I'll give this some > thought. > > >> Thanks for making me aware of the problem. > > >> > > >> > > >> > > >>> Also, could I get you to make a small change to your ANT script > > >>> which > > >>> packages your distribution? I had previously suggested (and you > > >>> implemented) a change to make the permissions 755 on > TestMaker.sh > > > >>> when > > >>> you perform your packaging. Could I talk you into doing the > same > > > >>> with > > >>> TestMaker.bat? I also run TestMaker in some Windows systems > and I > > >>> find > > >>> myself doing this within a cygwin environment as well. Cygwin > > >>> requires > > >>> executable permissions on batch files for execution purposes and > > >>> this > > >>> would prevent the step of changing permissions for other > TestMaker > > >>> users > > >>> running in this environment. > > >> > > >> I'm ok with making that change. > > >> > > >> Maybe you can help me with a different problem. The way the > build.xml > > >> script is written now, the .sh files are correctly set with > the 755 > > >> permissions, but the resulting Zip file has two copies of the .sh > > >> files. It's totally weird to me to see WinZip on Windows ask > if it > > >> can overwrite the .sh files. Any idea what I'm doing wrong? > > >> > > >> > > >>> > > >>> Since you included my suggestion for a SIP UAC/UAS I now wish I > had > > >>> edited it a little more closely... :o) I'm unsure how you plan > to > > >>> implement this feature in a single day (I rather thought > there was > > >>> more > > >>> than a days work there) but kudos if you can accomplish it. > I'll > be > > >>> working this week on a piece of code to handle new connection > > >>> requests > > >>> on a UAS. If you are interested in the code once I get it > polished, > > >>> I'll happily hand it over. I borrowed the design idea from > Simon > > >>> Foster's "Forwarding and Redirecting Network Ports" section > 13.13 > > >>> of the > > >>> "Python Cookbook", O'Reilly publishing. > > >> > > >> All the days are just estimates right now. I'm meeting with the > > >> engineers this week to get their estimate. Please send me the > code > > >> you create. I'd love to see your approach. > > >> > > >>> > > >>> In the future, you may also use your recorder on SIP > messaging by > > >>> redirecting your instant messenger to TestMaker as a proxy. > This > > >>> kinda > > >>> opens up a whole new realm of possibilities here as well... > > >> > > >> Totally agree with you on this. The proxy would easily > extended to > > >> record SIP sessions and create test cases. > > >> > > >>> > > >>> Thanks for the terrific work, Frank. If I come up with more > > >>> commentary, > > >>> I'll pass it along. > > >>> > > >>> -Kyle > > >>> > > >>> > > >>> On Wed, 2006-11-22 at 17:08 -0800, Frank Cohen wrote: > > >>>> Work on TestMaker 5 continues. I wrote up a specification of > the > > >>>> remaining projects to complete. I expect PushToTest will > fund the > > >>>> development of the projects in this specification. I would love > to > > >>>> hear your feedback, suggestions, and prioritization. > > >>>> > > >>>> Download the TestMaker 5 completion specification document at: > > >>>> http://downloads.pushtotest.com/tm5/TM5_Specification.pdf > > >>>> > > >>>> The document is 444K in Adobe Acrobat format. Please post your > > >>>> feedback to this list. > > >>>> > > >>>> Thanks. > > >>>> > > >>>> -Frank > > >>>> > > >>>> -- > > >>>> Frank Cohen, PushToTest, http://www.PushToTest.com, phone > 408 374 > > >>>> 7426 > > >>>> Enterprise test automation solutions to check and monitor Web- > > >>>> enabled > > >>>> applications for functionality, scalability and reliability. > > >>>> > > >>>> > > >>>> > > >>>> _______________________________________________ > > >>>> Users mailing list > > >>>> Users@lists.pushtotest.com > > >>>> http://lists.pushtotest.com/mailman/listinfo/users > > >>>> > > >>> > > >>> _______________________________________________ > > >>> Users mailing list > > >>> Users@lists.pushtotest.com > > >>> http://lists.pushtotest.com/mailman/listinfo/users > > >>> > > >> > > >> _______________________________________________ > > >> Users mailing list > > >> Users@lists.pushtotest.com > > >> http://lists.pushtotest.com/mailman/listinfo/users > > > > > > _______________________________________________ > > > Users mailing list > > > Users@lists.pushtotest.com > > > http://lists.pushtotest.com/mailman/listinfo/users > > > > > > > _______________________________________________ > > Users mailing list > > Users@lists.pushtotest.com > > http://lists.pushtotest.com/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users _______________________________________________ Users mailing list Users@lists.pushtotest.com http://lists.pushtotest.com/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://cake.pushtotest.com/pipermail/users/attachments/20070106/98ba8c38/attachment-0001.htm From kevin.dyer at matrixone.com Sat Jan 6 12:55:46 2007 From: kevin.dyer at matrixone.com (Dyer, Kevin) Date: Sat Jan 6 13:59:41 2007 Subject: [ptt-users] omission in post parameters Message-ID: Is that alpha code or demo code? ;) Kevin -------------------------- Kevin J. Dyer| Knowledge Management and Customer Advocacy, Technical Support | ENOVIA MatrixOne 210 Littleton Road | Westford, MA 01886 Office: +1 978 589 4165 | Fax: +1 978 589 5700 | Cell: +1 978 549 0971 kevin.dyer@MatrixOne.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://cake.pushtotest.com/pipermail/users/attachments/20070106/f419d785/attachment.htm From kevin.dyer at matrixone.com Sat Jan 6 11:44:27 2007 From: kevin.dyer at matrixone.com (Dyer, Kevin) Date: Sat Jan 6 14:34:49 2007 Subject: [ptt-users] omission in post parameters Message-ID: Alpha code ;) -------------------------- Kevin J. Dyer| Knowledge Management and Customer Advocacy, Technical Support | ENOVIA MatrixOne 210 Littleton Road | Westford, MA 01886 Office: +1 978 589 4165 | Fax: +1 978 589 5700 | Cell: +1 978 549 0971 kevin.dyer@MatrixOne.com -----Original Message----- From: users-bounces@lists.pushtotest.com To: TestMaker users list ; TestMaker users list Sent: Sat Jan 06 14:25:02 2007 Subject: RE: [ptt-users] omission in post parameters Oops ! I dont know why thats there sorry! -Geoff -----Original Message----- From: users-bounces@lists.pushtotest.com on behalf of Frank Cohen Sent: Sat 06/01/2007 16:46 To: TestMaker users list Subject: Re: [ptt-users] omission in post parameters Hi Geoff: I'm curious about the following: > try: > > self.body.setContentType(contenttype) > > except: > > print "Unexpected error:", sys.exc_info()[0] > > self.body.setContentType(contenttype) So if you get an exception while setting the content type, the code prints the error, and then tries to set the content type again? -Frank On Dec 4, 2006, at 5:59 AM, Geoff Meakin wrote: > Hi Frank, > > > > I have solved my problem by tweaking an agentbase function and a > tool java class and include the code below- feel free to add it > into the source if you feel its appropriate (personally I think > it's a really useful thing to be able to do). > > > > It now allows you to control the content type of a http-post, and > also post a pure value as well as key=value. > > > > In agentbase.py, post now reads: > > > > def post( self, url, params=None, contenttype='application/x- > www-form-urlencoded' ): > > > > And after setting the protocol I do: > > > > try: > > self.body.setContentType(contenttype) > > except: > > print "Unexpected error:", sys.exc_info()[0] > > self.body.setContentType(contenttype) > > > > And I have modified com/pushtotest/tool/protocolhandler/ > HTTPBody.java as follows: > > > > In the class declaration: > > > > private String contenttype = "application/x-www-form-urlencoded"; > > > > Modified addHeaders() method: > > > > public void addHeaders( HttpURLConnection con ) { > > con.setRequestProperty("Content-Type", contenttype); > > } > > > > New method: setContentType: > > > > public void setContentType( String newtype ) > > { > > contenttype=newtype; > > } > > > > Finally I have modified the method paramsAsString() as follows: > > > > ... > > for (int i=0; i < size; i++) { > > nkv = (keyvalue) params.elementAt( i ); > > > > String key = nkv.getKey(); > > String value = nkv.getValue(); > > > > if (key.length()==0) { > > buffer.append(value); > > } else { > > buffer.append(key).append("=").append(value); > > } > > > > Cheers > > -Geoff > > > > From: users-bounces@lists.pushtotest.com [mailto:users- > bounces@lists.pushtotest.com] On Behalf Of Geoff Meakin > Sent: 01 December 2006 10:59 > To: TestMaker users list; users@lists.pushtotest.com > Subject: RE: [ptt-users] omission in post parameters > > > > Hi, > > I have just read the w3c recs and spec, and note that basically you > can POST what you like as part of a POST request, but what is legal > depends on the Content-Type header declaration. > > Therefore for a application/x-www-form-urlencoded they do indeed > have to be key/value pairs, encoded properly. > > Therefore in this respect my application under test breaks the w3c > recs (nice) > > However, we are now modifying the Content-Type to text/xml, which > allows you to POST just xml. > > How would I do this in testmaker please? > > I.e. come up with something that looks like this: > > POST /url HTTP/1.1 > Host: foo.bar.com > Content-Type: text/xml > ..... more headers ..... > > > > > Thanks > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com on behalf of > Mark.Lutton@thomson.com > Sent: Thu 30/11/2006 18:55 > To: users@lists.pushtotest.com > Subject: FW: [ptt-users] omission in post parameters > > I don't think it is meaningful to have a single value without a > key. Here is an example of a POST request, which I got from http:// > www.jmarshall.com/easy/html/ : > > POST /path/script.cgi HTTP/1.0 > From: frog@jmarshall.com > User-Agent: HTTPTool/1.0 > Content-Type: application/x-www-form-urlencoded > Content-Length: 32 > > home=Cosby&favorite+flavor=flies > > You could also do this in the URL by putting the parameters into > the query: > > http://hostname.com/path/script.cgi?home=Cosby&favorite+flavor=flies > > But I don't know what the following means: > > http://hostname.com/path/script.cgi?Cosby > > Likewise: > > POST /path/script.cgi HTTP/1.0 > From: frog@jmarshall.com > User-Agent: HTTPTool/1.0 > Content-Type: application/x-www-form-urlencoded > Content-Length: 5 > > Cosby > > > In both cases Cosby looks like the key, not the value. On the > server side, what would ServletRequest.getParameterMap() return? > > A parameter value can be an array of strings; a single string is > equivalent to an array containing one string. Is this what you are > thinking of? I don't know the syntax for an array of values but I > guess it would be like this: > > self.params=[ [ '''key''', [ '''value1''', '''value2''', > '''value3''' ] ] ] > > So the following two would be equivalent: > > self.params= [ [ '''key''', [ '''value''' ] ] ] > > self.params= [ [ '''key''', '''value''' ] ] > > > Mark Lutton > Business Intelligence Services, a Thomson Business > > > ________________________________ > > From: users-bounces@lists.pushtotest.com on behalf of Geoff Meakin > Sent: Thu 11/30/2006 12:59 PM > To: TestMaker users list > Subject: [ptt-users] omission in post parameters > > > > Hi all, > > Does anyone know how to post a singleton parameter > > Normally: > > self.params= [ [ '''key''', '''value''' ] ] > self.post(url) > > However it should be possibly to also post: > > self.params= [ [ '''value''' ] ] > self.post(url) > > but doing this leads to an index out of bounds. > > I've checked HTTPBody.java and it DOES NOT have a method: > addParameter(String value) > > If anyone can help with how to do this, it would be gratefully > appreciated! > Or indeed any other thoughts... am a bit stuck out here! > > Cheers > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com > [mailto:users-bounces@lists.pushtotest.com] On Behalf Of Kyle Bell > Sent: 30 November 2006 15:40 > To: TestMaker users list > Subject: Re: [ptt-users] TestMaker 5 completion specification > > Frank, > > I know you were looking for some example code associated with SIP > enabled instant messaging clients. Follow the link below and click on > the Sip Communicator. This is a NIST sponsored IM and telephony > client. > > http://snad.ncsl.nist.gov/proj/iptel/ > > Regards, > > -Kyle > > On Wed, 2006-11-29 at 08:03 -0800, Frank Cohen wrote: > > That explains it. :-( Oh well. Thanks for finding this. I'll see > what > > > I can do when I write the TM 5 build scripts. Maybe I'll write my > own > > > zip handler. -Frank > > > > > > On Nov 29, 2006, at 7:42 AM, Kyle Bell wrote: > > > > > Frank, > > > > > > I found this tidbit from the ant user manual -> core tasks -> zip: > > > > > > Starting with Ant 1.5.2, can store Unix permissions > inside the > > > archive (see description of the filemode and dirmode attributes > for > > > ). Unfortunately there is no portable way to store > these > > > permissions. Ant uses the algorithm used by Info-Zip's > > > implementation of > > > the zip and unzip commands - these are the default versions of zip > and > > > unzip for many Unix and Unix-like systems. > > > > > > > > > Please note that the zip format allows multiple files of the same > > > fully- > > > qualified name to exist within a single archive. This has been > > > documented as causing various problems for unsuspecting users. If > you > > > wish to avoid this behavior you must set the duplicate > attribute to > a > > > value other than its default, "add". > > > > > > This likely explains your issue. The options available for the > > > duplicate attribute are as follows: > > > > > > duplicate -> behavior when a duplicate file is found. Valid values > are > > > "add", "preserve", and "fail". The default value is "add". > > > > > > In your zip task you may try specifying "preserve" as the value > rather > > > than the default of "add" and see where that takes you... > > > > > > Hope this helps... > > > > > > -Kyle > > > > > > > > > > > > On Mon, 2006-11-27 at 10:52 -0800, Frank Cohen wrote: > > >> Hi Kyle: Thanks for the feedback. See below. -Frank > > >> On Nov 27, 2006, at 9:41 AM, Kyle Bell wrote: > > >> > > >>> Frank, > > >>> > > >>> Nice feature list. I especially appreciate the first new > feature > > > >>> idea > > >>> by Bongos Amigos. I've not spent any time finding a good use > for > > >>> those > > >>> generated XML files and this would make them immediately > useful... > > >> > > >> Attached is an example TestScenario XML file. I'd love > feedback on > > > >> it. > > >> > > >>> Another enhancement or bug as it may be seen that I'd like to > see > > >>> addressed is the ability to kill a running TestCase from the > > >>> TestMaker > > >>> IDE which is not being controlled by XSTest. If a test case is > > >>> running > > >>> within the browser (perhaps it was written to run in an infinite > > >>> loop > > >>> correctly or by accident), I've not found a way to kill this > running > > >>> process as the "stop the agent" button appears not to be > effective. > > >> > > >> Interesting. When you click the stop button TestMaker kills the > > >> thread running the script. That's not a very nice way to do > it, but > > >> it's something necessary. I suppose another way would be to > have a > > >> signal to the running test case to stop. I'll give this some > thought. > > >> Thanks for making me aware of the problem. > > >> > > >> > > >> > > >>> Also, could I get you to make a small change to your ANT script > > >>> which > > >>> packages your distribution? I had previously suggested (and you > > >>> implemented) a change to make the permissions 755 on > TestMaker.sh > > > >>> when > > >>> you perform your packaging. Could I talk you into doing the > same > > > >>> with > > >>> TestMaker.bat? I also run TestMaker in some Windows systems > and I > > >>> find > > >>> myself doing this within a cygwin environment as well. Cygwin > > >>> requires > > >>> executable permissions on batch files for execution purposes and > > >>> this > > >>> would prevent the step of changing permissions for other > TestMaker > > >>> users > > >>> running in this environment. > > >> > > >> I'm ok with making that change. > > >> > > >> Maybe you can help me with a different problem. The way the > build.xml > > >> script is written now, the .sh files are correctly set with > the 755 > > >> permissions, but the resulting Zip file has two copies of the .sh > > >> files. It's totally weird to me to see WinZip on Windows ask > if it > > >> can overwrite the .sh files. Any idea what I'm doing wrong? > > >> > > >> > > >>> > > >>> Since you included my suggestion for a SIP UAC/UAS I now wish I > had > > >>> edited it a little more closely... :o) I'm unsure how you plan > to > > >>> implement this feature in a single day (I rather thought > there was > > >>> more > > >>> than a days work there) but kudos if you can accomplish it. > I'll > be > > >>> working this week on a piece of code to handle new connection > > >>> requests > > >>> on a UAS. If you are interested in the code once I get it > polished, > > >>> I'll happily hand it over. I borrowed the design idea from > Simon > > >>> Foster's "Forwarding and Redirecting Network Ports" section > 13.13 > > >>> of the > > >>> "Python Cookbook", O'Reilly publishing. > > >> > > >> All the days are just estimates right now. I'm meeting with the > > >> engineers this week to get their estimate. Please send me the > code > > >> you create. I'd love to see your approach. > > >> > > >>> > > >>> In the future, you may also use your recorder on SIP > messaging by > > >>> redirecting your instant messenger to TestMaker as a proxy. > This > > >>> kinda > > >>> opens up a whole new realm of possibilities here as well... > > >> > > >> Totally agree with you on this. The proxy would easily > extended to > > >> record SIP sessions and create test cases. > > >> > > >>> > > >>> Thanks for the terrific work, Frank. If I come up with more > > >>> commentary, > > >>> I'll pass it along. > > >>> > > >>> -Kyle > > >>> > > >>> > > >>> On Wed, 2006-11-22 at 17:08 -0800, Frank Cohen wrote: > > >>>> Work on TestMaker 5 continues. I wrote up a specification of > the > > >>>> remaining projects to complete. I expect PushToTest will > fund the > > >>>> development of the projects in this specification. I would love > to > > >>>> hear your feedback, suggestions, and prioritization. > > >>>> > > >>>> Download the TestMaker 5 completion specification document at: > > >>>> http://downloads.pushtotest.com/tm5/TM5_Specification.pdf > > >>>> > > >>>> The document is 444K in Adobe Acrobat format. Please post your > > >>>> feedback to this list. > > >>>> > > >>>> Thanks. > > >>>> > > >>>> -Frank > > >>>> > > >>>> -- > > >>>> Frank Cohen, PushToTest, http://www.PushToTest.com, phone > 408 374 > > >>>> 7426 > > >>>> Enterprise test automation solutions to check and monitor Web- > > >>>> enabled > > >>>> applications for functionality, scalability and reliability. > > >>>> > > >>>> > > >>>> > > >>>> _______________________________________________ > > >>>> Users mailing list > > >>>> Users@lists.pushtotest.com > > >>>> http://lists.pushtotest.com/mailman/listinfo/users > > >>>> > > >>> > > >>> _______________________________________________ > > >>> Users mailing list > > >>> Users@lists.pushtotest.com > > >>> http://lists.pushtotest.com/mailman/listinfo/users > > >>> > > >> > > >> _______________________________________________ > > >> Users mailing list > > >> Users@lists.pushtotest.com > > >> http://lists.pushtotest.com/mailman/listinfo/users > > > > > > _______________________________________________ > > > Users mailing list > > > Users@lists.pushtotest.com > > > http://lists.pushtotest.com/mailman/listinfo/users > > > > > > > _______________________________________________ > > Users mailing list > > Users@lists.pushtotest.com > > http://lists.pushtotest.com/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users _______________________________________________ Users mailing list Users@lists.pushtotest.com http://lists.pushtotest.com/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://cake.pushtotest.com/pipermail/users/attachments/20070106/8c2ceaf8/attachment-0001.htm From fcohen at pushtotest.com Sat Jan 6 13:31:44 2007 From: fcohen at pushtotest.com (Frank Cohen) Date: Sat Jan 6 14:35:41 2007 Subject: [ptt-users] omission in post parameters In-Reply-To: References: Message-ID: <07EBF10A-EF91-4943-B6B9-AA16D0151F6B@pushtotest.com> No problem. I skipped it. Thanks for the contribution. -Frank On Jan 6, 2007, at 11:25 AM, Geoff Meakin wrote: > Oops ! > > I dont know why thats there sorry! > > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com on behalf of Frank Cohen > Sent: Sat 06/01/2007 16:46 > To: TestMaker users list > Subject: Re: [ptt-users] omission in post parameters > > Hi Geoff: I'm curious about the following: > > > try: > > > > self.body.setContentType(contenttype) > > > > except: > > > > print "Unexpected error:", sys.exc_info()[0] > > > > self.body.setContentType(contenttype) > > So if you get an exception while setting the content type, the code > prints the error, and then tries to set the content type again? > > -Frank > > > > On Dec 4, 2006, at 5:59 AM, Geoff Meakin wrote: > > > Hi Frank, > > > > > > > > I have solved my problem by tweaking an agentbase function and a > > tool java class and include the code below- feel free to add it > > into the source if you feel its appropriate (personally I think > > it's a really useful thing to be able to do). > > > > > > > > It now allows you to control the content type of a http-post, and > > also post a pure value as well as key=value. > > > > > > > > In agentbase.py, post now reads: > > > > > > > > def post( self, url, params=None, contenttype='application/x- > > www-form-urlencoded' ): > > > > > > > > And after setting the protocol I do: > > > > > > > > try: > > > > self.body.setContentType(contenttype) > > > > except: > > > > print "Unexpected error:", sys.exc_info()[0] > > > > self.body.setContentType(contenttype) > > > > > > > > And I have modified com/pushtotest/tool/protocolhandler/ > > HTTPBody.java as follows: > > > > > > > > In the class declaration: > > > > > > > > private String contenttype = "application/x-www-form- > urlencoded"; > > > > > > > > Modified addHeaders() method: > > > > > > > > public void addHeaders( HttpURLConnection con ) { > > > > con.setRequestProperty("Content-Type", contenttype); > > > > } > > > > > > > > New method: setContentType: > > > > > > > > public void setContentType( String newtype ) > > > > { > > > > contenttype=newtype; > > > > } > > > > > > > > Finally I have modified the method paramsAsString() as follows: > > > > > > > > ... > > > > for (int i=0; i < size; i++) { > > > > nkv = (keyvalue) params.elementAt( i ); > > > > > > > > String key = nkv.getKey(); > > > > String value = nkv.getValue(); > > > > > > > > if (key.length()==0) { > > > > buffer.append(value); > > > > } else { > > > > buffer.append(key).append("=").append(value); > > > > } > > > > > > > > Cheers > > > > -Geoff > > > > > > > > From: users-bounces@lists.pushtotest.com [mailto:users- > > bounces@lists.pushtotest.com] On Behalf Of Geoff Meakin > > Sent: 01 December 2006 10:59 > > To: TestMaker users list; users@lists.pushtotest.com > > Subject: RE: [ptt-users] omission in post parameters > > > > > > > > Hi, > > > > I have just read the w3c recs and spec, and note that basically you > > can POST what you like as part of a POST request, but what is legal > > depends on the Content-Type header declaration. > > > > Therefore for a application/x-www-form-urlencoded they do indeed > > have to be key/value pairs, encoded properly. > > > > Therefore in this respect my application under test breaks the w3c > > recs (nice) > > > > However, we are now modifying the Content-Type to text/xml, which > > allows you to POST just xml. > > > > How would I do this in testmaker please? > > > > I.e. come up with something that looks like this: > > > > POST /url HTTP/1.1 > > Host: foo.bar.com > > Content-Type: text/xml > > ..... more headers ..... > > > > > > > > > > Thanks > > -Geoff > > > > > > > > -----Original Message----- > > From: users-bounces@lists.pushtotest.com on behalf of > > Mark.Lutton@thomson.com > > Sent: Thu 30/11/2006 18:55 > > To: users@lists.pushtotest.com > > Subject: FW: [ptt-users] omission in post parameters > > > > I don't think it is meaningful to have a single value without a > > key. Here is an example of a POST request, which I got from http:// > > www.jmarshall.com/easy/html/ : > > > > POST /path/script.cgi HTTP/1.0 > > From: frog@jmarshall.com > > User-Agent: HTTPTool/1.0 > > Content-Type: application/x-www-form-urlencoded > > Content-Length: 32 > > > > home=Cosby&favorite+flavor=flies > > > > You could also do this in the URL by putting the parameters into > > the query: > > > > http://hostname.com/path/script.cgi?home=Cosby&favorite > +flavor=flies > > > > But I don't know what the following means: > > > > http://hostname.com/path/script.cgi?Cosby > > > > Likewise: > > > > POST /path/script.cgi HTTP/1.0 > > From: frog@jmarshall.com > > User-Agent: HTTPTool/1.0 > > Content-Type: application/x-www-form-urlencoded > > Content-Length: 5 > > > > Cosby > > > > > > In both cases Cosby looks like the key, not the value. On the > > server side, what would ServletRequest.getParameterMap() return? > > > > A parameter value can be an array of strings; a single string is > > equivalent to an array containing one string. Is this what you are > > thinking of? I don't know the syntax for an array of values but I > > guess it would be like this: > > > > self.params=[ [ '''key''', [ '''value1''', '''value2''', > > '''value3''' ] ] ] > > > > So the following two would be equivalent: > > > > self.params= [ [ '''key''', [ '''value''' ] ] ] > > > > self.params= [ [ '''key''', '''value''' ] ] > > > > > > Mark Lutton > > Business Intelligence Services, a Thomson Business > > > > > > ________________________________ > > > > From: users-bounces@lists.pushtotest.com on behalf of Geoff Meakin > > Sent: Thu 11/30/2006 12:59 PM > > To: TestMaker users list > > Subject: [ptt-users] omission in post parameters > > > > > > > > Hi all, > > > > Does anyone know how to post a singleton parameter > > > > Normally: > > > > self.params= [ [ '''key''', '''value''' ] ] > > self.post(url) > > > > However it should be possibly to also post: > > > > self.params= [ [ '''value''' ] ] > > self.post(url) > > > > but doing this leads to an index out of bounds. > > > > I've checked HTTPBody.java and it DOES NOT have a method: > > addParameter(String value) > > > > If anyone can help with how to do this, it would be gratefully > > appreciated! > > Or indeed any other thoughts... am a bit stuck out here! > > > > Cheers > > -Geoff > > > > > > > > -----Original Message----- > > From: users-bounces@lists.pushtotest.com > > [mailto:users-bounces@lists.pushtotest.com] On Behalf Of Kyle Bell > > Sent: 30 November 2006 15:40 > > To: TestMaker users list > > Subject: Re: [ptt-users] TestMaker 5 completion specification > > > > Frank, > > > > I know you were looking for some example code associated with SIP > > enabled instant messaging clients. Follow the link below and > click on > > the Sip Communicator. This is a NIST sponsored IM and telephony > > client. > > > > http://snad.ncsl.nist.gov/proj/iptel/ > > > > Regards, > > > > -Kyle > > > > On Wed, 2006-11-29 at 08:03 -0800, Frank Cohen wrote: > > > That explains it. :-( Oh well. Thanks for finding this. I'll see > > what > > > > > I can do when I write the TM 5 build scripts. Maybe I'll write my > > own > > > > > zip handler. -Frank > > > > > > > > > On Nov 29, 2006, at 7:42 AM, Kyle Bell wrote: > > > > > > > Frank, > > > > > > > > I found this tidbit from the ant user manual -> core tasks -> > zip: > > > > > > > > Starting with Ant 1.5.2, can store Unix permissions > > inside the > > > > archive (see description of the filemode and dirmode attributes > > for > > > > ). Unfortunately there is no portable way to store > > these > > > > permissions. Ant uses the algorithm used by Info-Zip's > > > > implementation of > > > > the zip and unzip commands - these are the default versions > of zip > > and > > > > unzip for many Unix and Unix-like systems. > > > > > > > > > > > > Please note that the zip format allows multiple files of the > same > > > > fully- > > > > qualified name to exist within a single archive. This has been > > > > documented as causing various problems for unsuspecting > users. If > > you > > > > wish to avoid this behavior you must set the duplicate > > attribute to > > a > > > > value other than its default, "add". > > > > > > > > This likely explains your issue. The options available for the > > > > duplicate attribute are as follows: > > > > > > > > duplicate -> behavior when a duplicate file is found. Valid > values > > are > > > > "add", "preserve", and "fail". The default value is "add". > > > > > > > > In your zip task you may try specifying "preserve" as the value > > rather > > > > than the default of "add" and see where that takes you... > > > > > > > > Hope this helps... > > > > > > > > -Kyle > > > > > > > > > > > > > > > > On Mon, 2006-11-27 at 10:52 -0800, Frank Cohen wrote: > > > >> Hi Kyle: Thanks for the feedback. See below. -Frank > > > >> On Nov 27, 2006, at 9:41 AM, Kyle Bell wrote: > > > >> > > > >>> Frank, > > > >>> > > > >>> Nice feature list. I especially appreciate the first new > > feature > > > > > >>> idea > > > >>> by Bongos Amigos. I've not spent any time finding a good use > > for > > > >>> those > > > >>> generated XML files and this would make them immediately > > useful... > > > >> > > > >> Attached is an example TestScenario XML file. I'd love > > feedback on > > > > > >> it. > > > >> > > > >>> Another enhancement or bug as it may be seen that I'd like to > > see > > > >>> addressed is the ability to kill a running TestCase from the > > > >>> TestMaker > > > >>> IDE which is not being controlled by XSTest. If a test > case is > > > >>> running > > > >>> within the browser (perhaps it was written to run in an > infinite > > > >>> loop > > > >>> correctly or by accident), I've not found a way to kill this > > running > > > >>> process as the "stop the agent" button appears not to be > > effective. > > > >> > > > >> Interesting. When you click the stop button TestMaker kills the > > > >> thread running the script. That's not a very nice way to do > > it, but > > > >> it's something necessary. I suppose another way would be to > > have a > > > >> signal to the running test case to stop. I'll give this some > > thought. > > > >> Thanks for making me aware of the problem. > > > >> > > > >> > > > >> > > > >>> Also, could I get you to make a small change to your ANT > script > > > >>> which > > > >>> packages your distribution? I had previously suggested > (and you > > > >>> implemented) a change to make the permissions 755 on > > TestMaker.sh > > > > > >>> when > > > >>> you perform your packaging. Could I talk you into doing the > > same > > > > > >>> with > > > >>> TestMaker.bat? I also run TestMaker in some Windows systems > > and I > > > >>> find > > > >>> myself doing this within a cygwin environment as well. Cygwin > > > >>> requires > > > >>> executable permissions on batch files for execution > purposes and > > > >>> this > > > >>> would prevent the step of changing permissions for other > > TestMaker > > > >>> users > > > >>> running in this environment. > > > >> > > > >> I'm ok with making that change. > > > >> > > > >> Maybe you can help me with a different problem. The way the > > build.xml > > > >> script is written now, the .sh files are correctly set with > > the 755 > > > >> permissions, but the resulting Zip file has two copies of > the .sh > > > >> files. It's totally weird to me to see WinZip on Windows ask > > if it > > > >> can overwrite the .sh files. Any idea what I'm doing wrong? > > > >> > > > >> > > > >>> > > > >>> Since you included my suggestion for a SIP UAC/UAS I now > wish I > > had > > > >>> edited it a little more closely... :o) I'm unsure how you > plan > > to > > > >>> implement this feature in a single day (I rather thought > > there was > > > >>> more > > > >>> than a days work there) but kudos if you can accomplish it. > > I'll > > be > > > >>> working this week on a piece of code to handle new connection > > > >>> requests > > > >>> on a UAS. If you are interested in the code once I get it > > polished, > > > >>> I'll happily hand it over. I borrowed the design idea from > > Simon > > > >>> Foster's "Forwarding and Redirecting Network Ports" section > > 13.13 > > > >>> of the > > > >>> "Python Cookbook", O'Reilly publishing. > > > >> > > > >> All the days are just estimates right now. I'm meeting with the > > > >> engineers this week to get their estimate. Please send me the > > code > > > >> you create. I'd love to see your approach. > > > >> > > > >>> > > > >>> In the future, you may also use your recorder on SIP > > messaging by > > > >>> redirecting your instant messenger to TestMaker as a proxy. > > This > > > >>> kinda > > > >>> opens up a whole new realm of possibilities here as well... > > > >> > > > >> Totally agree with you on this. The proxy would easily > > extended to > > > >> record SIP sessions and create test cases. > > > >> > > > >>> > > > >>> Thanks for the terrific work, Frank. If I come up with more > > > >>> commentary, > > > >>> I'll pass it along. > > > >>> > > > >>> -Kyle > > > >>> > > > >>> > > > >>> On Wed, 2006-11-22 at 17:08 -0800, Frank Cohen wrote: > > > >>>> Work on TestMaker 5 continues. I wrote up a specification of > > the > > > >>>> remaining projects to complete. I expect PushToTest will > > fund the > > > >>>> development of the projects in this specification. I would > love > > to > > > >>>> hear your feedback, suggestions, and prioritization. > > > >>>> > > > >>>> Download the TestMaker 5 completion specification document > at: > > > >>>> http://downloads.pushtotest.com/tm5/TM5_Specification.pdf > > > >>>> > > > >>>> The document is 444K in Adobe Acrobat format. Please post > your > > > >>>> feedback to this list. > > > >>>> > > > >>>> Thanks. > > > >>>> > > > >>>> -Frank > > > >>>> > > > >>>> -- > > > >>>> Frank Cohen, PushToTest, http://www.PushToTest.com, phone > > 408 374 > > > >>>> 7426 > > > >>>> Enterprise test automation solutions to check and monitor > Web- > > > >>>> enabled > > > >>>> applications for functionality, scalability and reliability. > > > >>>> > > > >>>> > > > >>>> > > > >>>> _______________________________________________ > > > >>>> Users mailing list > > > >>>> Users@lists.pushtotest.com > > > >>>> http://lists.pushtotest.com/mailman/listinfo/users > > > >>>> > > > >>> > > > >>> _______________________________________________ > > > >>> Users mailing list > > > >>> Users@lists.pushtotest.com > > > >>> http://lists.pushtotest.com/mailman/listinfo/users > > > >>> > > > >> > > > >> _______________________________________________ > > > >> Users mailing list > > > >> Users@lists.pushtotest.com > > > >> http://lists.pushtotest.com/mailman/listinfo/users > > > > > > > > _______________________________________________ > > > > Users mailing list > > > > Users@lists.pushtotest.com > > > > http://lists.pushtotest.com/mailman/listinfo/users > > > > > > > > > > _______________________________________________ > > > Users mailing list > > > Users@lists.pushtotest.com > > > http://lists.pushtotest.com/mailman/listinfo/users > > > > > > > _______________________________________________ > > Users mailing list > > Users@lists.pushtotest.com > > http://lists.pushtotest.com/mailman/listinfo/users > > _______________________________________________ > > Users mailing list > > Users@lists.pushtotest.com > > http://lists.pushtotest.com/mailman/listinfo/users > > > > > > _______________________________________________ > > Users mailing list > > Users@lists.pushtotest.com > > http://lists.pushtotest.com/mailman/listinfo/users > > > > _______________________________________________ > > Users mailing list > > Users@lists.pushtotest.com > > http://lists.pushtotest.com/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users@lists.pushtotest.com > http://lists.pushtotest.com/mailman/listinfo/users From fcohen at pushtotest.com Wed Jan 10 12:27:47 2007 From: fcohen at pushtotest.com (Frank Cohen) Date: Wed Jan 10 13:32:40 2007 Subject: [ptt-users] TestMaker 4.4.1 release candidate available, please try it and vote Message-ID: A maintenance release of TestMaker 4.4.1 is now available for download at: http://downloads.pushtotest.com/TestMaker441.zip Please download it and look for problems, documentation bugs, and other issues. Please then let us know if you think this build is ready for release. We would ideally like to make this release general available in the coming week. Below is a list of changes in the new 4.4.1 distribution: - TestMaker 4.4.1 requires Java 1.5 or greater. We have started to use generics in the source and that causes the requirement. Please give us feedback on this decision. If it is a real pain to require Java 1.5 then we could back out these changes and save the Java 1.5 requirement for TestMaker 5 (which comes out later this year.) - WebObjects and Microsoft IIS users have occassionally found these servers returning HTTP redirect response codes with a relative URI. RFC 2116 section 14.30 requires the location header to be an absolute URI. According to the RFC relative URIs must only be sent using the META refresh tag. The TestMaker team does not want TestMaker to be a traffic cop for implementations of RFC 2116. So TestMaker 4.4.1 HTTPProtocol has a special check for the relative URI on redirect (HTTP response code 302) and adds the domain name itself from the original POST. TestMaker scripts must use the http_protocol_handler.connect(1) form to follow redirects. Recorded scripts do not automatically add the (1) parameter. Thanks to Aaron Romeo, Dominique de Waleffe, and Kevin Dyer for participating in developing the solution. - TestMaker.sh and TestMaker.bat are start-up shell scripts for TestMaker on Unix/Linux and Windows operating systems. These scripts build a classpath for TestMaker. Previous versions used external scripts in the util directory to build the complete classpath. On Windows NT and 2000 operating systems this caused a "script too long" exception. TestMaker 4.4.1 builds the classpath in the TestMaker.bat and TestMaker.sh scripts directly. Thanks to Aaron Romeo for pointing out the problems and recommending a solution. - Scripts using TestMaker_home/lib/agentbase.py would throw a NullPointerException if there were no return parameters in a GET or POST command. Thanks to Todd Bradfute for a patch that solves this problem. Scripts using agentbase.py to check links to image tags would throw a "Has no attribute 'handler'" exception when an exception was encountered. Thanks to Todd Bradfute for a patch that solves this problem. - Long running XSTest operations may run out of memory. HTTPProtocol has a URLlist that grows while the test runs to keep track of URLs and redirected URLs. TestMaker 4.4.1 changes agentbase.py to call the HTTPProtocol clearURLlist() method in the config() method. That way the list is reset each time the test's setUp() method is called. Thanks to Carl Herder for pointing out the problems and recommending a solution. - agentbase.py has a new feature to control the content type of a http-post, and also post a pure value as well as key=value. The post method takes an additional optional parameter to set the content-type of the post. For instance, post( url, params, 'application/x-www-form- urlencoded' ). Thanks to Geoff Meakin (geoffm at gamesys.co dot uk) for the contribution. -Frank From fcohen at pushtotest.com Thu Jan 11 10:53:04 2007 From: fcohen at pushtotest.com (Frank Cohen) Date: Thu Jan 11 11:58:12 2007 Subject: [ptt-users] Please vote on TestMaker 4.4.1 release Message-ID: <8CDF8D7B-C17D-4690-9DC0-4F09DE18DD29@pushtotest.com> So far, the response to the maintenance release has been positive. Would you please vote on releasing it. Thanks for everyone's help on this. -Frank --- A maintenance release of TestMaker 4.4.1 is now available for download at: http://downloads.pushtotest.com/TestMaker441.zip Please download it and look for problems, documentation bugs, and other issues. Please then let us know if you think this build is ready for release. We would ideally like to make this release general available in the coming week. Below is a list of changes in the new 4.4.1 distribution: - TestMaker 4.4.1 requires Java 1.5 or greater. We have started to use generics in the source and that causes the requirement. Please give us feedback on this decision. If it is a real pain to require Java 1.5 then we could back out these changes and save the Java 1.5 requirement for TestMaker 5 (which comes out later this year.) - WebObjects and Microsoft IIS users have occassionally found these servers returning HTTP redirect response codes with a relative URI. RFC 2116 section 14.30 requires the location header to be an absolute URI. According to the RFC relative URIs must only be sent using the META refresh tag. The TestMaker team does not want TestMaker to be a traffic cop for implementations of RFC 2116. So TestMaker 4.4.1 HTTPProtocol has a special check for the relative URI on redirect (HTTP response code 302) and adds the domain name itself from the original POST. TestMaker scripts must use the http_protocol_handler.connect(1) form to follow redirects. Recorded scripts do not automatically add the (1) parameter. Thanks to Aaron Romeo, Dominique de Waleffe, and Kevin Dyer for participating in developing the solution. - TestMaker.sh and TestMaker.bat are start-up shell scripts for TestMaker on Unix/Linux and Windows operating systems. These scripts build a classpath for TestMaker. Previous versions used external scripts in the util directory to build the complete classpath. On Windows NT and 2000 operating systems this caused a "script too long" exception. TestMaker 4.4.1 builds the classpath in the TestMaker.bat and TestMaker.sh scripts directly. Thanks to Aaron Romeo for pointing out the problems and recommending a solution. - Scripts using TestMaker_home/lib/agentbase.py would throw a NullPointerException if there were no return parameters in a GET or POST command. Thanks to Todd Bradfute for a patch that solves this problem. Scripts using agentbase.py to check links to image tags would throw a "Has no attribute 'handler'" exception when an exception was encountered. Thanks to Todd Bradfute for a patch that solves this problem. - Long running XSTest operations may run out of memory. HTTPProtocol has a URLlist that grows while the test runs to keep track of URLs and redirected URLs. TestMaker 4.4.1 changes agentbase.py to call the HTTPProtocol clearURLlist() method in the config() method. That way the list is reset each time the test's setUp() method is called. Thanks to Carl Herder for pointing out the problems and recommending a solution. - agentbase.py has a new feature to control the content type of a http-post, and also post a pure value as well as key=value. The post method takes an additional optional parameter to set the content-type of the post. For instance, post( url, params, 'application/x-www-form- urlencoded' ). Thanks to Geoff Meakin (geoffm at gamesys.co dot uk) for the contribution. -Frank -- Frank Cohen, PushToTest, http://www.PushToTest.com, phone 408 374 7426 TestMaker: The open-source SOA test automation tool From geoffm at gamesys.co.uk Fri Jan 12 09:25:28 2007 From: geoffm at gamesys.co.uk (Geoff Meakin) Date: Fri Jan 12 10:31:13 2007 Subject: [ptt-users] Solution to testmaker recorder slowness problem? Message-ID: Hi Frank, I was mucking around with both testmaker and my own proxy server recently, and noticed a problem which may ring a bell with you or not... I don't really know how testmaker's proxy works, but if a server returns a header: Transfer-encoding: chunked But the proxy itself sends back unchunked data, then the browser will be very slow in a HTTP/1.1 type keep-alive connection. (Because the browser expecting chunked information and not getting it so keeping the connection open even if the server specifies Connection: close) If none of that makes sense then don't worry, I fixed mine by intercepting transfer-encoding: chunked and changing it to a Content-Length declaration instead. Cheers -Geoff -----Original Message----- From: users-bounces@lists.pushtotest.com [mailto:users-bounces@lists.pushtotest.com] On Behalf Of Frank Cohen Sent: 11 January 2007 18:53 To: TestMaker users list Subject: [ptt-users] Please vote on TestMaker 4.4.1 release So far, the response to the maintenance release has been positive. Would you please vote on releasing it. Thanks for everyone's help on this. -Frank --- A maintenance release of TestMaker 4.4.1 is now available for download at: http://downloads.pushtotest.com/TestMaker441.zip Please download it and look for problems, documentation bugs, and other issues. Please then let us know if you think this build is ready for release. We would ideally like to make this release general available in the coming week. Below is a list of changes in the new 4.4.1 distribution: - TestMaker 4.4.1 requires Java 1.5 or greater. We have started to use generics in the source and that causes the requirement. Please give us feedback on this decision. If it is a real pain to require Java 1.5 then we could back out these changes and save the Java 1.5 requirement for TestMaker 5 (which comes out later this year.) - WebObjects and Microsoft IIS users have occassionally found these servers returning HTTP redirect response codes with a relative URI. RFC 2116 section 14.30 requires the location header to be an absolute URI. According to the RFC relative URIs must only be sent using the META refresh tag. The TestMaker team does not want TestMaker to be a traffic cop for implementations of RFC 2116. So TestMaker 4.4.1 HTTPProtocol has a special check for the relative URI on redirect (HTTP response code 302) and adds the domain name itself from the original POST. TestMaker scripts must use the http_protocol_handler.connect(1) form to follow redirects. Recorded scripts do not automatically add the (1) parameter. Thanks to Aaron Romeo, Dominique de Waleffe, and Kevin Dyer for participating in developing the solution. - TestMaker.sh and TestMaker.bat are start-up shell scripts for TestMaker on Unix/Linux and Windows operating systems. These scripts build a classpath for TestMaker. Previous versions used external scripts in the util directory to build the complete classpath. On Windows NT and 2000 operating systems this caused a "script too long" exception. TestMaker 4.4.1 builds the classpath in the TestMaker.bat and TestMaker.sh scripts directly. Thanks to Aaron Romeo for pointing out the problems and recommending a solution. - Scripts using TestMaker_home/lib/agentbase.py would throw a NullPointerException if there were no return parameters in a GET or POST command. Thanks to Todd Bradfute for a patch that solves this problem. Scripts using agentbase.py to check links to image tags would throw a "Has no attribute 'handler'" exception when an exception was encountered. Thanks to Todd Bradfute for a patch that solves this problem. - Long running XSTest operations may run out of memory. HTTPProtocol has a URLlist that grows while the test runs to keep track of URLs and redirected URLs. TestMaker 4.4.1 changes agentbase.py to call the HTTPProtocol clearURLlist() method in the config() method. That way the list is reset each time the test's setUp() method is called. Thanks to Carl Herder for pointing out the problems and recommending a solution. - agentbase.py has a new feature to control the content type of a http-post, and also post a pure value as well as key=value. The post method takes an additional optional parameter to set the content-type of the post. For instance, post( url, params, 'application/x-www-form- urlencoded' ). Thanks to Geoff Meakin (geoffm at gamesys.co dot uk) for the contribution. -Frank -- Frank Cohen, PushToTest, http://www.PushToTest.com, phone 408 374 7426 TestMaker: The open-source SOA test automation tool _______________________________________________ Users mailing list Users@lists.pushtotest.com http://lists.pushtotest.com/mailman/listinfo/users From fcohen at pushtotest.com Fri Jan 12 10:33:23 2007 From: fcohen at pushtotest.com (Frank Cohen) Date: Fri Jan 12 11:38:49 2007 Subject: [ptt-users] Solution to testmaker recorder slowness problem? In-Reply-To: References: Message-ID: <743A93B5-CBD7-4914-9BDE-2B7C392A3DD7@pushtotest.com> Hi Geoff: Thanks for the research. TestMaker uses a branch of the MaxQ proxy recorder. MaxQ sets up a proxy to watch for HTTP traffic. The branch of the MaxQ code is part of the tm44 repository in cvs.pushtotest.com. The bit of code that handles the transfer size is in com.bitmechanic.maxq.RequestHandler. There's no real support for chucked transfers. If there is no content-length header then it just keeps reading and forwarding bytes as long as the stream stays open. We're planning to add HTTPS support to the proxy recorder in TestMaker 5. I'm going to do some research on this to see what should be done to better support checked transfers. I'll also ask the MaxQ group, although they've been dormant for a long time. -Frank On Jan 12, 2007, at 9:25 AM, Geoff Meakin wrote: > Hi Frank, > > I was mucking around with both testmaker and my own proxy server > recently, and noticed a problem which may ring a bell with you or > not... > > I don't really know how testmaker's proxy works, but if a server > returns > a header: > > Transfer-encoding: chunked > > But the proxy itself sends back unchunked data, then the browser > will be > very slow in a HTTP/1.1 type keep-alive connection. > > (Because the browser expecting chunked information and not getting > it so > keeping the connection open even if the server specifies Connection: > close) > > If none of that makes sense then don't worry, I fixed mine by > intercepting transfer-encoding: chunked and changing it to a > Content-Length declaration instead. > > Cheers > -Geoff > > > > -----Original Message----- > From: users-bounces@lists.pushtotest.com > [mailto:users-bounces@lists.pushtotest.com] On Behalf Of Frank Cohen > Sent: 11 January 2007 18:53 > To: TestMaker users list > Subject: [ptt-users] Please vote on TestMaker 4.4.1 release > > So far, the response to the maintenance release has been positive. > Would you please vote on releasing it. Thanks for everyone's help on > this. -Frank > > > --- > > A maintenance release of TestMaker 4.4.1 is now available for > download at: > > http://downloads.pushtotest.com/TestMaker441.zip > > Please download it and look for problems, documentation bugs, and > other issues. Please then let us know if you think this build is > ready for release. We would ideally like to make this release general > available in the coming week. > > Below is a list of changes in the new 4.4.1 distribution: > > - TestMaker 4.4.1 requires Java 1.5 or greater. We have started to > use generics in the source and that causes the requirement. Please > give us feedback on this decision. If it is a real pain to require > Java 1.5 then we could back out these changes and save the Java 1.5 > requirement for TestMaker 5 (which comes out later this year.) > > - WebObjects and Microsoft IIS users have occassionally found these > servers returning HTTP redirect response codes with a relative URI. > RFC 2116 section 14.30 requires the location header to be an absolute > URI. According to the RFC relative URIs must only be sent using the > META refresh tag. The TestMaker team does not want TestMaker to be a > traffic cop for implementations of RFC 2116. So TestMaker 4.4.1 > HTTPProtocol has a special check for the relative URI on redirect > (HTTP response code 302) and adds the domain name itself from the > original POST. TestMaker scripts must use the > http_protocol_handler.connect(1) form to follow redirects. Recorded > scripts do not automatically add the (1) parameter. Thanks to Aaron > Romeo, Dominique de Waleffe, and Kevin Dyer for participating in > developing the solution. > > - TestMaker.sh and TestMaker.bat are start-up shell scripts for > TestMaker on Unix/Linux and Windows operating systems. These scripts > build a classpath for TestMaker. Previous versions used external > scripts in the util directory to build the complete classpath. On > Windows NT and 2000 operating systems this caused a "script too long" > exception. TestMaker 4.4.1 builds the classpath in the TestMaker.bat > and TestMaker.sh scripts directly. Thanks to Aaron Romeo for pointing > out the problems and recommending a solution. > > - Scripts using TestMaker_home/lib/agentbase.py would throw a > NullPointerException if there were no return parameters in a GET or > POST command. Thanks to Todd Bradfute for a patch that solves this > problem. > Scripts using agentbase.py to check links to image tags would throw a > "Has no attribute 'handler'" exception when an exception was > encountered. Thanks to Todd Bradfute for a patch that s