Repository Tools 2: Testing Advice
Review the crosswalk mappings (both harvest and deposit)
Once the crosswalk map has been edited, we recommend that you use the functionality to ‘Test harvest/deposit crosswalk’ to review the mappings and ensure they are transforming the metadata as anticipated.
The Harvest and Deposit crosswalks each have buttons to perform a test crosswalk, using the currently installed harvest crosswalk map file. This provides a mechanism to understand and test the behaviour of harvest crosswalks, without making any changes to data within Elements. The input data for the test can be specified as either:
a DSpace item id (this is a number for DSpace v5.x, or a UUID for DSpace v6.x), or
an xml file which represents the input to a crosswalk (this will have been obtained previously either by testing a crosswalk using a repository item id (see above) or from verbose logs (see below)).
On clicking the button Elements will perform the crosswalk and download a zip file that contains:
the map file used by the crosswalk (eg. dspace-XwalkIn-map.xml)
the input xml prior to crosswalking (eg. xxx_Input.xml)
the output xml from the crosswalk process (eg. xxx_Output.xml).
These can be used to review a publication of each type being crosswalked to the repository.
Once you are happy the mapping represent the transformations you are anticipating, you can move on to doing actual tests of the harvest and deposit functionality to see the metadata represented in the Elements and repository UIs.
Prepare to test the operation of the harvest crosswalk
As always, it is strongly recommended that all testing occurs in a test or dev environment. We also recommend you back-up Elements before commencing testing.
When testing your crosswalks, it is recommended that the ‘Use verbose logging when harvesting’ setting for the repository is set on. This will instruct Elements to store a copy of each repository item before and after the crosswalk has been applied. This can be helpful when verifying behaviour. See Updating and Testing Crosswalks for details of downloading verbose log files.
You may also wish initially to limit the volume of data being crosswalked during testing. This can be done by limiting harvesting to use only named collections and/or by limiting which items are selected by the crosswalk (comment out parts of the <xwalkin:object-type-selector> element).
Test the operation of the harvest crosswalk
Enable the repository data source via the Elements Data Source Management page for crosswalking to be performed.The inbound crosswalk map is used by both Elements harvest and fetch functions (see the RT2 functional overview for more information). The first time you run the harvest, it will commence shortly after being enabled.
Once the harvest has completed, select a series of records from the repository and review the corresponding records within Elements.
Make notes of any inaccuracies in the data transfer, using your list of required functionality as a reference point. You may then adjust your crosswalk as necessary.
To review changes to a repository record within Elements after updating your crosswalks, you can trigger a fetch for an individual record by clicking on the Full Text tab on the My Publications screen before opening the detailed publication information page.
If a crosswalk is incorrect and inaccurately maps metadata for items into Elements, the metadata will be be rectified once the crosswalk map file has been adjusted, as all of the metadata about the items will be re-fetched into Elements at a later time.
Note: After the initial harvest has been run, re-harvesting and fetch are background tasks run on a routine basis (controlled by the Elements Synchroniser service) so it is not usually possible to force particular behaviour at a specific time. If you do need to force a re-harvest of data, please contact Symplectic support for assistance.
Prepare to test the operation of the deposit crosswalk
As always, it is strongly recommended that all testing occurs in a test or dev environment. We also recommend you back-up Elements before commencing testing.
When testing your crosswalks, it is recommended that the ‘Use verbose logging when harvesting’ setting for the repository is set on. This will instruct Elements to store a copy of each repository item before and after the crosswalk has been applied. This can be helpful when verifying behaviour. See Updating and Testing Crosswalks for details of downloading verbose log files.
Test the operation of the deposit crosswalk
The repository data source must be enabled via the repository’s Data Source Management page in Elements and ‘Allow deposit’ must be turned on for crosswalking to be performed.
Select your test publications in Elements and deposit to your repository via Elements. The outbound crosswalk is invoked by making a deposit to an RT2 repository. Immediately following the deposit Elements will fetch the newly deposited item from the repository as a new record in Elements (it is important that the inbound crosswalk has already been set up by this stage. See Repository Tools 2: Repository as Data Source).
Review the test publications in your repository. Make notes of any inaccuracies in the data transfer, using your list of required functionality as a reference point. You may then adjust your crosswalk and re-test as necessary.
