[Httpunit-develop] Re: http upload
Brought to you by:
russgold
From: Court D. <cou...@ya...> - 2000-10-16 19:37:56
|
One condition is clear. I have been having troubles with the HTML parsing. In general I like the parameter validation, but then the HTML page isn't parsed properly the forms aren't always built correctly, and validation will fail. With the static interface I'm forced to turn off validation for any of my test cases.. even though I have my tests in a number of different files. The situation would be worse if there were multiple developers on my project all writing test cases. I want to be able to run all of my testcases simultaneously during stress testing. That would not be possible if other developers are using validation and I'm not. A static HttpUnitOptions is the equivalent using global variables. If you want to set things only once, create an HttpUnitOptions.setDefault() or WebConversation.setDefaultOptions(). However, you should always have the option of setting the options per-conversation instance. court --- Russell Gold <rus...@ac...> wrote: > At 8:48 PM -0400 10/13/00, Court Demas wrote: > >I've actually got a subclass of the PostMethodWebRequest which handles > >multiple files and normal parameters too. And actually, after I wrote > it > >I thought I might just merge it into the PostMethodWebRequest itself - > >because it's really just a POST request. The code is actually fairly > >small and wouldn't clutter things too much. However, I think I'll > leave > >it as a separate class for now. (I'm using the o'reilly servlets > package > >to handle uploads on the servlet side). > > I have tried that class, and didn't like the fact that it doesn't extend > the HttpServletRequest interface. Your class sounds good; we can discuss > integrating it into PostMethodWebRequest at some point. > > > > >I'd like to see the HttpUnitOptions be a regular class (not a > singleton) > >and something that could be set on a WebConversation. Having it static > >prevents different parts of an application from using different > options. > >You could even make a static call like > WebConversation.setDefaultOptions() > >if you wanted the old semantics. What do you think?>> > > I'm not sure - under what conditions would you want one WebConversation > to use different options than another? I usually just turn options on > or off as needed during my tests. Convince me. > > ------------------------------------------------------------------------ > Russell Gold | "... society is tradition and order > rus...@ac... (preferred) | and reverence, not a series of cheap > rus...@ne... | bargains between selfish interests." > rg...@th... | - Poul Anderson, "Iron" > > > > > __________________________________________________ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/ |