Re: Off topic: Python unit testing tools

Dan Connolly wrote:
> On Sat, 2005-10-22 at 11:01 +0100, Graham Klyne wrote:
> 
>>[...] any Python
>>equivalents to Mock object, XMLUnit and HTTPUnit libraries available in
>>Java?
> 
> 
> I'm not sure what those are.

FYI:
  http://www.mockobjects.com/FrontPage.html
  http://xmlunit.sourceforge.net/  (I just noticed
http://opensource.thoughtworks.com/projects/xmlunit.jsp - apparently
someone's working on a PyUnit port)
  http://httpunit.sourceforge.net/

Basically they're all providing JUnit bolt-on modules of various kinds
to ease the writing of test cases.

Currently, its a Python version of XMLUnit I'm after, which makes it
easy to write tests that looks for particular properties in XML files
(e.g. abstracting away XML-equivalents like <a></a> == <a/> and order of
attributes, and allowing to look for particular XML-fragment values
selected using Xpath and/or XSLT expressions).

> There is of course pyunit
> http://pyunit.sourceforge.net/
> 
> I gather it's "batteries included"... yes...
> http://docs.python.org/lib/module-unittest.html

Yes, I've been using that, on-and-off, for a while.

> I use doctest pretty regularly.
> http://docs.python.org/lib/module-doctest.html

Cool!  I'd overlooked that.  I see that being excellent for what I might
call "micro-unit" testing.

> On the chance that HTTPunit is what I think it is,
> I think the equivalent is:
>  Website unit/regression testing tool
>  http://mechanicalcat.net/tech/webunit/

Yes, excellent, thanks!   My search didn't uncover that.

>  <- http://wwwsearch.sourceforge.net/mechanize/
>  <- http://del.icio.us/connolly/testing+python

That leads me to
  http://www.opensourcetesting.org/
which looks like a useful resource.  Thanks again.

...

Anyway, pulling together these various strands, I've started a wiki page at:
  http://wiki.oss-watch.ac.uk/SoftwareTesting

#g

-- 
Graham Klyne
For email:
http://www.ninebynine.org/#Contact

Received on Sunday, 23 October 2005 10:13:06 UTC