Re: Requirement of a new ServletRunner constructor in HttpUnit 1.7
Xiaofeng Guo <[email protected]> Tue, 18 Aug 2009 16:31:25 +0800
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks Wolfgang! 1) About the unit test. Because I can't find a single unit test file for ServletRunner, I don't know where can I add the unit test for ServletRunner(InputStream, File, String). If it is enough to use other unit tests for proving the correctness, I think the call by other constructors are enough. Any more suggesstions? 2) About the servlettest enabled problem, I think it is a small change. I changed it to make all servlet tests pass, so I patch it at the same time. 3) About Time format change. Hmm, you are right. Maybe you can remove my code about this from the patch, my change is dirty, I agreed. 4) About one more error I found. My environment is : Core2 Quad 6600 + Windows XP SP3 + JDK1.6. I only use console on testing this, not using Eclipse. Classpath? Hmm, I think I just follow what the pom.xml file indicated. In general, the first item is what I need. Others are just problems I found and fixed simply. Thanks for your review! Best Regards, Xiaofeng On Mon, Aug 17, 2009 at 10:32 PM, Wolfgang Fahl<[email protected]> wrote: > Dear Xiaofeng, > thanks for your e-mail. > you wrote: >> BTW, I still can't pass all unit tests for having an failure as below: >> >> [java] Time: 11.954 >> [java] There was 1 failure: >> [java] 1) >> testSelfReferentialRedirect(com.meterware.httpunit.WebClientTest)junit.framework.AssertionFailedError: >> Sh >> ould have thrown a RecursiveRedirectionException >> [java] at >> >> com.meterware.httpunit.WebClientTest.testSelfReferentialRedirect(WebClientTest.java:652) >> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >> Method) >> [java] at >> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> [java] at >> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> [java] at >> com.meterware.httpunit.HttpUnitSuite.main(HttpUnitSuite.java:49) >> [java] >> >> This failure exists in the truck, I am sorry I can't figure out the >> problem, because it can't be reproduced in my Eclipse environment. I >> am a bit confusing about this problem, would you take a look at the >> same time? Thanks! > I've tried to find out what the issue could be. > You might want to debug WebWindow. shouldFollowRedirect > and check why you do not get a > HttpURLConnection. HTTP_MOVED_TEMP > response code there despite it being set in the testcase. > A minute ago I checked the latest trunk on my machine. I also had a few > problem JUnit testcases. Two were related to my locale and another fix was > simply not checked in also James Courtney hat pointed it out a few months > ago. The one above is new to me. Please note that the HttpUnit 1.7 release > was originally checked against a JDK 1.5 environment with JDK 1.3 and JDK > 1.4 compatibility in mind. > Personally I'd be in favor of moving to JDK 1.5 and > JDK 1.6 with future versions. So far we have been reluctant to do this. > To check your problem I'd need to at least know: > - the Operating System you are running on > - the JDK / Eclipse version you are using > - other local information that might be relevant > Also it's important how you set up the libraries/classpath. The checked in > Eclipse version assumes that the CLASSPATH MAVEN_REPOSITORY variable is set > and that the necessary libraries were checked out there. > Yours > Wolfgang > BITPlan - smart solutions > Pater-Delp-Str. 1, D-47877 Willich Schiefbahn > Tel. +49 2154 811-480, Fax +49 2154 811-481 > Web: http://www.bitplan.de > bitplan GmbH, Willich - HRB 6820 Krefeld, VAT-ID: 10258040548, > Geschäftsführer: Wolfgang Fahl > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july