[ptt-users] omission in post parameters
Frank Cohen
fcohen at pushtotest.com
Fri Dec 8 23:54:55 PST 2006
Set the body of the HTTPProtocolHandler to the contents of your XML
and then make a POST connection.
We're researching now ways to support AJAX and REST style calls
better. Any ideas on how to improve TestMaker along these lines would
be appreciated, and timely.
-Frank
On Dec 1, 2006, at 10:58 AM, Geoff Meakin wrote:
> 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 .....
>
> <some><xml></xml></some>
>
>
> Thanks
> -Geoff
>
>
>
> -----Original Message-----
> From: users-bounces at lists.pushtotest.com on behalf of
> Mark.Lutton at thomson.com
> Sent: Thu 30/11/2006 18:55
> To: users at 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 at 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 at 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 at 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 at lists.pushtotest.com
> [mailto:users-bounces at 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, <zip> can store Unix permissions
> inside the
> > > archive (see description of the filemode and dirmode attributes
> for
> > > <zipfileset>). 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 at lists.pushtotest.com
> > >>>> http://lists.pushtotest.com/mailman/listinfo/users
> > >>>>
> > >>>
> > >>> _______________________________________________
> > >>> Users mailing list
> > >>> Users at lists.pushtotest.com
> > >>> http://lists.pushtotest.com/mailman/listinfo/users
> > >>>
> > >>
> > >> _______________________________________________
> > >> Users mailing list
> > >> Users at lists.pushtotest.com
> > >> http://lists.pushtotest.com/mailman/listinfo/users
> > >
> > > _______________________________________________
> > > Users mailing list
> > > Users at lists.pushtotest.com
> > > http://lists.pushtotest.com/mailman/listinfo/users
> > >
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.pushtotest.com
> > http://lists.pushtotest.com/mailman/listinfo/users
> >
>
> _______________________________________________
> Users mailing list
> Users at lists.pushtotest.com
> http://lists.pushtotest.com/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> Users at lists.pushtotest.com
> http://lists.pushtotest.com/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.pushtotest.com
> http://lists.pushtotest.com/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.pushtotest.com
> http://lists.pushtotest.com/mailman/listinfo/users
More information about the Users
mailing list