[Zope-CMF] Re: CMFTestCase: Best way to create the CMF site?

Stefan H. Holek stefan at epy.co.at
Fri Oct 7 04:38:23 EDT 2005


Exactly!

ZopeTestCase (CMFTestCase, PloneTestCase) was designed for testing  
*applications*. As you say, when I write a CMF application I should  
be able to assume the CMF below works. In this case a "fat fixture"  
makes perfect sense (to me). Also, I firmly believe application  
developers should not need to dig deep into the framework just to be  
able to write some tests; this was my motivation for starting ZTC in  
the first place.

I am not in the business of shoving CMFTestCase down anybody's  
throat. CMFCore.tests.base has everything CMF-the-framework needs,  
and SecurityRequestTest provides basically the same fixture you would  
get from using ZTC (app object, transaction, request, and security  
context).

Whether tests you write turn out to be unit or integration tests does  
not depend on the test framework, IMO. It depends on where you draw  
the line in the stack.

Stefan


On 6. Okt 2005, at 17:47, Tres Seaver wrote:

> I do not believe that "trusting the stack" makes senses when trying to
> test a component of the stack.  If you are writing tests for an
> application (or higher layer) which *uses* the stack, then you can
> safely trust it.  For instance, I'm willing to use OFS.SimpleItem and
> OFS.Folder when building out a test jig, because they belong to a  
> lower
> layer of the stack, and have their own tests.

--
Anything that happens, happens.  --Douglas Adams




More information about the Zope-CMF mailing list