[CPS-devel] GenericSetup testing in CPS

Georges Racinet gracinet at nuxeo.com
Wed Mar 22 14:56:56 CET 2006


I'd like to point everyone at the CPSUtil.testing.genericsetup  
module.  It's there to provide helpers for all GenericSetup related  
testing.

It was created a while back by Anahide when she corrected a bug in  
the Trees Tool I/O, but it hasn't been widely used yet.
The goal is to provide a set of test case base classes to ease all  
testing related to GenericSetup that has to be done in a CPS Context.

    At the full profile level, we have ExportImportTestCase. You can  
use it to make an assertion on a given configuration (e.g., check  
some consistency) and track bugs in the import process.
  More specifically, it's able to register a profile, import it,  
export it and check things in the produced tarball. This is a  
ZopeTestCase.
  You can use it to import the profile you want to test as well as  
one upon which your module relies. Anahide, please correct me if I  
missed something.

   At the adapter level, we have TestXMLAdapter. This base class can  
be used for instance in CPSZCMLLayer. The daughter class has to  
implement buildObject (the object to be adapted) and can use  
importString to launch importation. See  
CPSSchemas.tests.test_exportimport for an example. There's no export  
helper yet, since I didn't need it.

If those base classes lack features you need, this is the right place  
to implement them, or request them to be implemented.

---------
Georges Racinet                        Nuxeo SAS
gracinet at nuxeo.com                http://nuxeo.com
Tel: +33 (0) 1 40 33 71 73




More information about the cps-devel mailing list
More information about CPS: CPS project - CVS - API

Hosting: Nuxeo: Zope service provider


This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.