Re: Requirement of a new ServletRunner constructor in HttpUnit 1.7

"Wolfgang Fahl" <[email protected]> Mon, 17 Aug 2009 16:32:32 +0200
Newsgroups gmane.comp.web.httpunit.devel
Organization BITPlan GmbH
Message-ID <[email protected]>
Hi Xiaofeng,

Thank you for your patch.

To add your proposed changes i would need JUnit test 
code that actually tests what your changes are intending 
to do - this refers to the constructor you intend to 
add. I'd need at least one JUnit test that acutally 
calls this constructor.

The Current trunk contains an improved version of the 
cookie test that you were intending to fix. The culprit 
was that the HH:mm:ss spec was missing leading to 
different results on different locales for the time 
part.



Wolfgang

Date sent:	Wed, 12 Aug 2009 15:34:56 +0800
From:	Xiaofeng Guo <[email protected]>
To:	[email protected]
Copies to:	[email protected]
Subject:	Re: [Httpunit-develop] Requirement of a 
new ServletRunner
	constructor in HttpUnit 1.7
Send reply to:	Discussion of use and development of 
HttpUnit
	<httpunit-
[email protected]>
	<httpunit-
develop.lists.sourceforge.net>
	<mailto:httpunit-develop-
[email protected]?subject=unsubscribe>
	<mailto:httpunit-develop-
[email protected]?subject=subscribe>

> Hi Wolfgang,
> 
> I attached my patch, it includes:
> - META-INF support for servlettest.
> - Unit test error on cookie expiration time.
> - Unit test error of head time conversion.
> - Add/Modify some ServletRunner constructors.
> 
> Would you help me to take a look? If OK, would you help me check in
> the code? Thanks!
> 
> Best Regards,
> Xiaofeng
> 
> 
> 
> On Sat, Aug 8, 2009 at 5:23 PM, Wolfgang Fahl<[email protected]> wrote:
> > Xiaofeng,
> > thank you for your mail,
> > you wrote:
> >> I am trying to use the servlet unittest framework of httpunit. My case
> >> is a bit special, I need to read file in the _contextDir, which
> >> construct in com.meterware.servletunit.WebApplication. However,
> >> ServletRunner doesn't provide a way for me to set this variable. I am
> >> wondering whether it is suitable to add constructors as below in
> >> ServletRunner?
> >>
> >>     public ServletRunner(InputStream webXml, File contextDir, String
> >> contextPath) throws SAXException, IOException {
> >>       InputSource inputSource=new InputSource( webXml );
> >>       Document doc=HttpUnitUtils.parse(inputSource);
> >>       _application = new WebApplication( doc, contextDir, contextPath );
> >>       completeInitialization( contextPath );
> >>     }
> >>
> >> I both attached a draft change of this file. I am wondering about the
> >> check-in criteria of HttpUnit, including questions as below:
> >> - How many unit tests I need to pass before checking the code?
> > All the ones that passed before your modifications/additions + at least one
> > test that uses/checks the modified/added code.
> >> - How about the coding style of the code?
> > Please stick to what you find in the existing code. If we only talk about a
> > few lines I'll do the style-fixing before checking in.
> >> I'll follow that and check in the code. Is it OK to you? Thanks for
> >> your comments!
> > Yes - adding a constructor won't harm too much.
> > Beware of the other changes you are suggesting (cleaning up the code). It
> > takes a lot of time to check such changes which might hold up the check in
> > for many weeks or months. Currently there is a backlog of changes of a few
> > month sincce  I don't get to checking in things very often. The best chances
> > are for small clear patches which are accompanied by a simple JUnit test.
> > Thanks for your cooperation! I'm looking forward to your patch.
> > 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
> >
> > The following section of this message contains a file attachment
> > prepared for transmission using the Internet MIME message format.
> > If you are using Pegasus Mail, or any other MIME-compliant system,
> > you should be able to save it or view it from within your mailer.
> > If you cannot, please ask your system administrator for assistance.
> >
> >   ---- File information -----------
> >     File:  ServletRunner.java
> >     Date:  8 Aug 2009, 11:06
> >     Size:  11111 bytes.
> >     Type:  Unknown
> >
> >
> 



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

_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop