[kforge-dev] Some testing tools worth looking at
Rufus Pollock
rufus.pollock at okfn.org
Thu Sep 21 11:10:04 UTC 2006
py.test
=======
http://codespeak.net/py/current/doc/test.html
I came across py.test a while back but have only had the chance to play
with it one of my own projects recently and have found it extremely good
(better than unittest in my opinion). Can't do the full feature-set
justice here (check out the link above for that) but here is a rough
summary of the pros and cons:
+ Per-class as well as per-method setUp methods
+ Debug with the print statement (*really* useful)
+ More detailed error reports
+ no failUnless, failUnlessEqual etc but just a simple assert
+ test disabling inline
- Not in the standard library (unittest is)
twill
=====
http://twill.idyll.org/
twill is a web automation and testing suite built on top of mechanize.
Haven't really played with this but it looks very nice and has some good
recommendations. So far we've been using webunittest which is 'ok' but
no longer seems to be actively developed.
Example code:
from twill import commands as web web.go('http://myhost.exmaple.com/')
web.formvalue('login', 'username', "stephen")
web.formvalue('login', ' password', "secr3t")
web.submit
web.code(200)
web.find('Login Successful')
+ Both full python and simple scripts (that could be created by the
non-programmer)
+ Actively developed
+ Supports stress-testing
- ...
More information about the kforge-dev
mailing list