ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Meade" <eme...@geekfarm.org>
Subject RE: HttpUnit task: anyone ?
Date Sat, 16 Dec 2000 03:50:57 GMT
Sure,

I always thought that the documentation
(http://httpunit.sourceforge.net/doc/Cookbook.html)
used JUnit, but now that I look at it, I see that it isn't JUnit specific.
So here is about
the simplest example I could come up with:


import com.meterware.httpunit.GetMethodWebRequest;
import com.meterware.httpunit.WebConversation;
import com.meterware.httpunit.WebResponse;
import com.meterware.httpunit.WebRequest;

public class TitleTest extends junit.framework.TestCase {

    public TitleTest(String name) {
        super(name);
    }

    public void testTitle() throws Exception {
        WebConversation wc = new WebConversation();
        WebRequest req = new
GetMethodWebRequest("http://httpunit.sourceforge.net/");
        WebResponse resp = wc.getResponse(req);
        assertEquals("HttpUnit", resp.getTitle());
    }
}


I feel pretty strongly that someone could come up with a nice scripting
language or
XML sort of automated functional/acceptance testing.  What a great thing to
be able
to do after your build!



> -----Original Message-----
> From: Stefan Lecho [mailto:Stefan.Lecho@iconmedialab.com]
> Sent: Friday, December 15, 2000 1:34 AM
> To: 'ant-user@jakarta.apache.org'
> Subject: RE: HttpUnit task: anyone ?
>
>
> Is it possible to send an example how you use the JUnit task for HttpUnit
> stuff ?
>
> -----Original Message-----
> From: Erik Meade [mailto:emeade@geekfarm.org]
> Sent: Friday, December 15, 2000 8:14 AM
> To: ant-user@jakarta.apache.org
> Subject: RE: HttpUnit task: anyone ?
>
>
> I put my HttpUnit stuff in JUnit tests so I can use
> the junit task.
>
> Erik
>
> > -----Original Message-----
> > From: Peter Donald [mailto:donaldp@apache.org]
> > Sent: Wednesday, December 13, 2000 3:53 PM
> > To: ant-user@jakarta.apache.org
> > Cc: ant-user@jakarta.apache.org
> > Subject: Re: HttpUnit task: anyone ?
> >
> >
> > At 04:33  13/12/00 +0100, Stefan Lecho wrote:
> > >Is there anyone building a HttpUnit task ?
> >
> > Not that I know of ... but it would be kewl ;)
> >
> > Cheers,
> >
> > Pete
> >
> > *-----------------------------------------------------*
> > | "Faced with the choice between changing one's mind, |
> > | and proving that there is no need to do so - almost |
> > | everyone gets busy on the proof."                   |
> > |              - John Kenneth Galbraith               |
> > *-----------------------------------------------------*


Mime
View raw message