Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Alternatives to WebUnit

0 views
Skip to first unread message

Ben Finney

unread,
Oct 20, 2003, 2:16:31 AM10/20/03
to
Howdy all,

In searching for tools to run automated regression tests against a Web
aplication, I found (amid a number of tools requiring non-free Java) the
WebUnit code:

<http://webunit.sourceforge.net/>

Unfortunately, the code is somewhat beta and doesn't seem to have been
updated since 02-Feb-2002. Does anyone know if this has been updated
since, or merged into some other project?

Alternatively, does anyone know a (preferably Python) tool for automated
regression testing of Web apps?

--
\ "I moved into an all-electric house. I forgot and left the |
`\ porch light on all day. When I got home the front door wouldn't |
_o__) open." -- Steven Wright |
Ben Finney <http://bignose.squidly.org/>

Ian Bicking

unread,
Oct 20, 2003, 3:31:04 AM10/20/03
to Ben Finney, pytho...@python.org
On Monday, October 20, 2003, at 01:16 AM, Ben Finney wrote:
> Howdy all,
>
> In searching for tools to run automated regression tests against a Web
> aplication, I found (amid a number of tools requiring non-free Java)
> the
> WebUnit code:
>
> <http://webunit.sourceforge.net/>

There's another bit of code going by the same name at
http://mechanicalcat.net/tech/webunit -- I haven't tried it, so I don't
know what it's like. puffinhome.org is another Python web tester. The
author was quite gung-ho at one time, but I haven't heard much from it
in a while. It seems to be intended more for QA people, as opposed to
programmer-written tests.

> Unfortunately, the code is somewhat beta and doesn't seem to have been
> updated since 02-Feb-2002. Does anyone know if this has been updated
> since, or merged into some other project?

Last time I looked at it, it didn't look like there was any movement,
and that was quite a bit more than a year ago. What I remember that
webunit implementing -- mostly just httpsession -- is better
implemented elsewhere now (ClientCookie and ClientForm might be good
things to look at).

--
Ian Bicking | ia...@colorstudy.com | http://blog.ianbicking.org


Diez B. Roggisch

unread,
Oct 20, 2003, 4:51:13 AM10/20/03
to
Hi,


> Unfortunately, the code is somewhat beta and doesn't seem to have been
> updated since 02-Feb-2002. Does anyone know if this has been updated
> since, or merged into some other project?
>
> Alternatively, does anyone know a (preferably Python) tool for automated
> regression testing of Web apps?

I stumbled over http://mechanicalcat.net/tech/webunit/ and found it quite
useful. I didn't compare the two of them - so you gotta see for yourself if
its better. I also don't know if its actively developed, but to be honest:
HTTP has been around for a while, and I don't expect a webunit module to
develop rapidly :)

Regards,

Diez

Wilk

unread,
Oct 20, 2003, 5:13:33 AM10/20/03
to
Ben Finney <bignose-h...@and-benfinney-does-too.id.au> writes:

> Howdy all,
>
> In searching for tools to run automated regression tests against a Web
> aplication, I found (amid a number of tools requiring non-free Java) the
> WebUnit code:
>
> <http://webunit.sourceforge.net/>
>
> Unfortunately, the code is somewhat beta and doesn't seem to have been
> updated since 02-Feb-2002. Does anyone know if this has been updated
> since, or merged into some other project?
>
> Alternatively, does anyone know a (preferably Python) tool for automated
> regression testing of Web apps?

I use ClientForm and ClientCookies from http://wwwsearch.sourceforge.net/

--
Wilk - http://flibuste.net

Alan Kennedy

unread,
Oct 20, 2003, 6:40:40 AM10/20/03
to
[Ben Finney wrote]

> In searching for tools to run automated regression tests against a Web
> aplication, I found (amid a number of tools requiring non-free Java) the
> WebUnit code:

I don't understand why you don't like Java?

For those who might be interested, the following open-source java
tools do automated web testing.

http://jakarta.apache.org/commons/latka/
http://maxq.tigris.org/

Or you could roll your own using jython and Apache Commons HttpClient

http://jakarta.apache.org/commons/httpclient/

regards,

--
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan: http://xhaus.com/mailto/alan

Alan Kennedy

unread,
Oct 20, 2003, 6:45:55 AM10/20/03
to
Ian Bicking wrote:
> puffinhome.org is another Python web tester. The
> author was quite gung-ho at one time, but I haven't heard much from it
> in a while. It seems to be intended more for QA people, as opposed to
> programmer-written tests.

Puffin is not a bad little tool, and it's not too hard to get up to
speed with it for basic testing. However, there are two major flaws

1. It builds up a *huge* xml DOM to store its results. This rules it
out for anything other than simple tests: it *eats* memory.

2. There is hardly any documentation. Meaning that you have to wade
through the source to determine necessary details, e.g. whether it
supports HTTP 1.1 (IIRC it doesn't), etc.

John J. Lee

unread,
Oct 20, 2003, 8:02:00 AM10/20/03
to
Ian Bicking <ia...@colorstudy.com> writes:

> On Monday, October 20, 2003, at 01:16 AM, Ben Finney wrote:
> > Howdy all,
> >
> > In searching for tools to run automated regression tests against a Web
> > aplication, I found (amid a number of tools requiring non-free Java)
> > the
> > WebUnit code:
> >
> > <http://webunit.sourceforge.net/>

Horses for courses, I think: it all depends on what you're testing.
For lots of tests, there's no need for any HTTP traffic at all, of
course -- a lot of testing can and should be internal to your web
application. For the rest, in a lot of unit tests it doesn't matter
how faithfully the client mimicks a real browser. For other tests,
you'd be a fool not to do it by automating Mozilla or Konqueror or
MSIE (as many as you can be bothered to test). An example: a while
ago, my HTML Forms code (ClientForm) had utterly broken file upload
code. OTOH, I had several happily passing unit tests -- the problem
was that I was testing against Python's cgi module rather than a
'real' server (of course, I was well aware of this possibility, or
rather likelihood -- just hadn't got round to testing on more than one
'real' web server). Of course, in that case, both the server and the
client were not 'real' (ClientForm replaced a browser, cgi module
replaced the server & web app framework), but the point's the same
whatever server you're using.

Actually, it's worth remembering that, when you're doing HTTP requests
direct from Python (rather than automating a browser), you might well
be able to do everything you need using only the standard library.
urllib2 (GET / POST with redirections, proxies etc.) plus
urllib.urlencode (for HTML forms &c) will do just fine for a lot of
stuff. The major things that other code will buy you (I think) is
cookie support and HTML forms parsing and abstraction (and embedded
script interpretation, but you'd have to use Java or a browser for
that ATM -- there's no stable Python code to do that). Oh, and easy
parsing of whatever else you're interested in from your HTML -- I
think DOM is easiest for that in some cases, HTMLParser or regexps in
others. Somebody here had the nice idea of using lynx for parsing
tables.

In particular, then, webunit.sf.net is simple (good) but doesn't have
a very good cookies implementation. IIRC the forms interface is a bit
low-level for my taste (but that *is* mostly a matter of taste -- I
hate all the messy details of HTML forms, so wrote ClientForm to hide
it behind a consistent interface). Also IIRC, webunit & co. don't
parse forms, which you may or may not want. I don't think old-webunit
is actively maintained. There's some good Java code out there, but
you say you don't want that -- fair enough. I've never used the other
webunit, and I forgot about puffin until this thread, so I can't
remember a thing about it. :-)


[about the new webunit]


> There's another bit of code going by the same name at
> http://mechanicalcat.net/tech/webunit -- I haven't tried it, so I

Could anybody send me tarball? The link to the .tgz is broken.


[about the old webunit]


> > Unfortunately, the code is somewhat beta and doesn't seem to have been
> > updated since 02-Feb-2002. Does anyone know if this has been updated
> > since, or merged into some other project?
>
> Last time I looked at it, it didn't look like there was any movement,
> and that was quite a bit more than a year ago. What I remember that
> webunit implementing -- mostly just httpsession -- is better
> implemented elsewhere now (ClientCookie and ClientForm might be good
> things to look at).

Yes, that's certainly true of cookies, HTML forms is more a matter of
taste and whether you want to do form parsing as part of your tests.
Lots of people just use urllib.urlencode for that.

But I wouldn't be surprised if this new webunit (the one at
mechanicalcat.net) actually uses some of my code 'under the hood'.
Certainly anybody writing their own cookie handling code is a
masochist, IMNSHO ;-) If so, I guess it's a matter of taste again
whether you use the underlying modules or prefer a framework on top.


John

Ben Finney

unread,
Oct 20, 2003, 9:08:46 PM10/20/03
to
On Mon, 20 Oct 2003 11:40:40 +0100, Alan Kennedy wrote:
> [Ben Finney wrote]

>> a number of tools requiring non-free Java
>
> I don't understand why you don't like Java?

Because, thanks to Sun's increasingly restrictive licensing, any
meaningfully modern version of the complete Java environment is
implemented as non-free software, as I alluded above.

--
\ "Time flies like an arrow. Fruit flies like a banana." -- |
`\ Groucho Marx |
_o__) |
Ben Finney <http://bignose.squidly.org/>

Ben Finney

unread,
Oct 20, 2003, 9:29:56 PM10/20/03
to
On 20 Oct 2003 16:06:31 +0950, Ben Finney wrote:
> Alternatively, does anyone know a (preferably Python) tool for
> automated regression testing of Web apps?

Thanks to all for suggestions. I've now got three URLs to investigate
for automated web-application testing tools:

<http://mechanicalcat.net/tech/webunit/>
<http://wwwsearch.sourceforge.net/>
<http://puffinhome.org/>

--
\ "I used to be a proofreader for a skywriting company." -- |
`\ Steven Wright |

Karl Anderson

unread,
Oct 21, 2003, 5:46:50 PM10/21/03
to
Ben Finney <bignose-h...@and-benfinney-does-too.id.au> writes:

> Thanks to all for suggestions. I've now got three URLs to investigate
> for automated web-application testing tools:
>
> <http://mechanicalcat.net/tech/webunit/>
> <http://wwwsearch.sourceforge.net/>
> <http://puffinhome.org/>

I have a few more links to look at:

http://viii.dclxvi.org/bookmarks/tech/zope/test

Somewhat zope-centric.

--
Karl Anderson k...@monkey.org http://monkey.org/~kra/

0 new messages