Exit code, colors, etc. when testing Plone

Do you want to have colored output showing problems with your tests? Are you looking to setup an automated system like Buildbot to run your tests? If so then this little tip could help you.

When you run your Plone tests you normally use zope.testing. The version shipped with Zope 2 that
you normally get is outdated. The newer versions have a lot of extra functionality. Fortunately it is pretty easy to get a newer version setup.

Edit your buildout.cfg and add versions section and a reference to it in you buildout section:

[buildout]
versions = versions

[versions]
zope.testing = 3.7.1

The last line tells buildout what version it needs to enforce. Now edit your instance section (the part with recipe = plone.recipe.zope2instance) and add zope.testing to the eggs = option.

Now enjoy your new version.

Advertisements

No comments yet

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: