[Product-Developers] Re: unit test on Plone 4.0b1

Martin Aspeli optilude+lists at gmail.com
Sat Mar 20 16:40:52 UTC 2010


leejason wrote:
> Hi,
>
> Does anybody know how to do unit test on Plone 4.0b1? My current effort is
> based on the following:
>
>
> http://plone.org/documentation/kb/testing/writing-a-plonetestcase-unit-integration-test
>
> and I adjusted to add the following to my buildout.cfg:
>
>    [test]
>    recipe = zc.recipe.testrunner
>    eggs =
>        ${instance:eggs}
>        myproduct.contenttype
>
> However, it seems: (1) the execution time is too long (2 minutes or so), (2)
> the test result specific to my own "myproduct.contenttype" is buried in all
> test results of "${instance:eggs}" and hard to spot....
>
> Any suggestion for making life easier would be really appreciated.

As Wichert said, ideally, myproduct.contenttype should be the only one 
you list; it should declare all its dependencies (Plone included, if 
indeed that is a dependency) in setup.py.

That said, if you do what you did, you can run just the tests for your 
package with:

  $ bin/test -s myproduct.contenttype

Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book





More information about the Product-Developers mailing list