Hi, a couple of months ago, Chris McDonough tipsed me about a script called make_request.py that set up a fake request. I need this now to be able to write unit tests for CMF applications (which isn't trivial, me don't think - maybe a quasi-framework would be cool?). Does any one know where I can find this script?
Hi Erik, Look in the Testing package in lib/python (makerequest.py). - C Erik Enge wrote:
Hi,
a couple of months ago, Chris McDonough tipsed me about a script called make_request.py that set up a fake request. I need this now to be able to write unit tests for CMF applications (which isn't trivial, me don't think - maybe a quasi-framework would be cool?).
Does any one know where I can find this script?
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
[Chris McDonough] | Look in the Testing package in lib/python (makerequest.py). Thanks. No wonder I couldn't find it, I was looking for make_request.py. D'oh!
[Erik Enge] | Does any one know where I can find this script? Sorry, nevermind. lib/python/Testing/makerequest.py
On Wednesday 01 August 2001 22:39, you wrote:
a couple of months ago, Chris McDonough tipsed me about a script called make_request.py that set up a fake request. I need this now to be able to write unit tests for CMF applications (which isn't trivial, me don't think - maybe a quasi-framework would be cool?).
Have you looked at ZUnit? I've started using it and it's pretty useful. Sure, it has no documentation, and unittest in zope 2.3.3 is way outta date, but we're still using it... sourceforge.net/projects/zunit Only available as CVS. Also, installation can be "fun" :) You must check out all three CVS modules. . ZUnit and ZUnitExternal _must_ be installed in SOFTWARE_HOME/lib/python/Products (ie. no INSTANCE_HOME/Products) . Shared_Hiper must be installed in SOFTWARE_HOME/lib/python/Shared as Hiper I wrote an actual README when I first started working with it, but recently lost the file due to some foolishness with upgrading my workstation :( In short, use the ZUnit-samples.xml export in the ZUnitExternal Product to see how a sample works. The other export files in ZUnit didn't work for me. You might also want to edit the failure.dtml and error.dtml in ZUnit/dtml/TestMonitor to make them not emit comments. Not sure what the rationale is there, but if you don't, you have to view the HTML source to see errors... Hope this helps, Richard
[Richard Jones] | Have you looked at ZUnit? Yeah :) | I've started using it and it's pretty useful. Sure, it has no | documentation, Sure it has. I wrote a how-to for it a couple of weeks ago. I think it's meant to be included in the next release. | You might also want to edit the failure.dtml and error.dtml in | ZUnit/dtml/TestMonitor to make them not emit comments. Not sure what | the rationale is there, but if you don't, you have to view the HTML | source to see errors... Yeah, I actually added code to ZUnit to produce nice red or green "lights" on tests the pass of failed. I also included functionality to describe each test and print some "meaningfull" names as the tests were run; I don't think Lalo liked it, and I did the patch on not-CVS-code so that's still just on my harddrive, though. Thanks anyway, though. :-)
participants (3)
-
Chris McDonough -
Erik Enge -
Richard Jones