Using gsxml to fill your site with test data
Introduction
Creating a good 'publicly' viewable set of test content data in plone can be time-consuming and extremely detailed. Using GSXML you can take away the pain of recreating test data each time and simply import your Plone or custom content from a tar archive file or set of xml files.
You can also create several different sets of test data. Enabling you to have a 'preview' set to populate in your public test site for clients to see and your 'development' test data that covers a lot more...
Before you get started below, you'll need to download and install GSXML from here
and follow the installation procedure it describes. The project homepage has detailed instructions for how to do this.
In one site that we recently prepared, we had a data with a lot of references.
Background
GSXML makes heavy use of the component architecture in Zope3. The Marshall products transforms objects into a xml representations and Generic Setup governs the export/import process. GSXML wraps components from both of these products together to generate a simple import/export process for Archetype-based content. Its works out of the box for the default plone types and can easily be extended to work with your own content types (see below).
Exporting your data
Plone content
Custom content
Which archetypes fields does it work for?
The standard References and Images as well as the other standard archetype fields work ok and we also have it working fine with archetypes using FileStorage fields. The file saved along with the xml and imported as required.
But in the days of Zope3 development, support for annotations and marker interfaces is necessary. These features haven't been developed yet (its only up to alpha 0.4.1) but I'm assured it is planned.
- Pre-amble
- Pre-requisits: gsxml installed
- Creating test data
- Exporting data
- Importing data for testing
- Appendix 1: Marking custom archetype content as

Author: