[Zope3-dev] Suggestions for the test runner (a.k.a test.py)

Sidnei da Silva sidnei at plone.org
Fri Oct 31 14:48:03 EST 2003


Howdy folks,

I would like to make two changes to the test runner (and I don't know
where to start or if people find this useful, so the question), and I
would like to hear your opinion on it:

1. I would like to be possible to run a .zcml file upfront and exactly
once for an entire test suite. This is more or less like the
functional testing and ftesting.zcml, but it is not a functional
test. Let's call it a 'integration test'. 

Why this is useful: Because when developing for Zope 3, you may want
to run tests which mimic the live site, including any 'overrides' you
may have done in zcml. To do that, you may want some set of zcml which
may *not* be all of Zope 3, but a subset of it. Using xmlconfig.file
on setUp() has the downside that if you loading enough of the
machinery, it takes around the same time zope 3 takes to start and
shutdown for *each* single unit test. 

2. I would like to add an option to run the profiler on a testsuite or
a subset of tests. 

Why this is useful: To be able to reuse the unittests, on a complete
setup (given you have feature 1 here) and identify what part of the
code is acting slowly without really needing to run the
application/click around/etc.

How would this work: I think it would work more or less like:
 - run setUp()
 - configure profiler (instantiate, etc)
 - run profiler with the testname (like testXXXX)
 - stop the profiler
 - run tearDown()

Suggestions?

[]'s
-- 
Sidnei da Silva <sidnei at awkly.org>
dreamcatching :: making your dreams come true
http://awkly.org

The less time planning, the more time programming.



More information about the Zope3-dev mailing list