[Grok-dev] Grok, testing and test setups

Uli Fouquet uli at gnufix.de
Sun Dec 26 08:40:38 EST 2010


Hi there,

Thanks to Giampaolo Rodolà, who noticed that the current Grok reference
docs are pretty outdated concerning tests and test setups, I found out
that also the current grokproject generated tests (i.e. the tests and
test setups in created projects) are broken. See:

  https://bugs.launchpad.net/bugs/677401

All this, of course, needs a major upgrade and I am currently working on
that.

While thinking about and discussing that it came to mind that our usual
approaches with z3c.testsetup (for grokproject generated projects) or
zope.testing-based testing (for grokcore.*, megrok.* projects) might not
be 'state of the art' anymore.

Many other Python-based webframeworks meanwhile switched to py.test or
nose for discovering and executing tests. This way they benefit from
many extensions, a broad developer community and more goodies, one
certainly want to have. Maybe it's time for Grok to switch too.

The main problem for introducing such enhanced testing libraries in a
Grok/Zope environment might be the setup of functional tests with all
the ZODB handling, ZCML registrations, etc. Fortunately, Martijn already
wrote some code to ease that task for py.test and he is willing to share
that, most probably in a new package 'zope.pytest' (many thanks,
Martijn!).

My plan for documentation and grokproject is roughly to 

1) prepare and release zope.pytest

2) explain/introduce py.test based test setups based on zope.pytest and 
   kick zope.testing as well as z3c.testsetup in docs and grokproject.

Once we have a 'common' way for testing/test setups, one _could_ start
to switch also grokcore.*, megrok.* projects step by step to py.test,
nose or something different.

As I am not too experienced yet with py.test (but Martijn, who already
uses py.test in active projects told it is very well thought) or nose,
I'd hereby want to ask for co-developers and general remarks/input
concerning that topic.

We might want to discuss that also at next IRC meeting.

Please tell what you think!

Best regards and a merry christmas to everybody,

-- 
Uli

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20101226/3dd1d1c3/attachment.bin 


More information about the Grok-dev mailing list