[Grok-dev] Getting started with grok testing
Uli Fouquet
uli at gnufix.de
Tue Jul 6 08:20:02 EDT 2010
Hi Achim,
Achim Domma wrote:
> > Sorry for the long text. It most probably still lacks important pieces
> > but maybe it helps at least to get you starting. Please don't hesitate
> > to ask! I'm also currently preparing some texts in German language about
> > that topic. So, if you're interested in them, please tell.
>
> wow! Thanks a lot for this very detailed answer! I'm sure I will have more detailed question
Sure, you're welcome!
> , but here's a first one:
>
> At the moment I'm mainly interested in doctests for functional testing. How do I start grok in an interactive way to develop these doctests and to just play around? According to my book "zopectl debug" should work, but my Grok version seems to support only the paster based start up.
I think we have to make this more public somehow and somewhere, as
you're the second person asking this in this week :-)
The current grokproject should generate a script
./bin/interactive_debugger
which gives you similar functionality (I didn't use it very often yet,
so I cannot give much more details).
If you don't find the above script in your bin/ directory and if the
grok version you use in your project is fairly recent, then you should
be able to create the debugger by adding a section like this to your
buildout.cfg:
[buildout]
...
parts =
...
interactive_debugger
...
...
[interactive_debugger]
recipe = z3c.recipe.dev:script
eggs = sample
module = grokcore.startup.startup
method = interactive_debug_prompt
arguments = zope_conf="${zope_conf:output}"
(where 'sample' would be your project's egg name, of course) and
rerunning ./bin/buildout.
> And I would of course be very interested in reading your german texts about testing.
Hm, okay, so I should make that public. It's part of a thing pretentious
called 'The Grok Book' (and which will be renamed to "Notes on Grok"
soon). A grouped collection of experiences with Grok/Zope/Python I am
writing down in (rare) spare-time:
$ svn co https://svn.gnufix.de/repos/main/grokbook/trunk/ grokbook
It's completely sphinx-driven. The root README.txt tells how to generate
the 'book'. See the (yet rather empty) testing chapter. Comments, etc.
are welcome, of course.
Best regards,
--
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/20100706/c68419a7/attachment-0001.bin
More information about the Grok-dev
mailing list