The SAP Commerce Cloud Test Adapter Extension

The SAP Commerce Cloud Test Adapter enables you to quickly set up Data Hub instances for testing. It intercepts Data Hub publications that would ordinarily be sent to a HybrisCore target. You can then complete the full load, composition, and publication cycle without the need to install and configure SAP Commerce Cloud.

The SAP Commerce Cloud Test Adapter is available as an optional extension for Data Hub. To install it, simply place the extension in the /opt/datahub/extensions/. No further configuration is necessary. The Test Adapter automatically intercepts any publication being sent to a HybrisCore target.

Data Hub Test Adapter provides the following benefits:
  • It enables you to test all Data Hub processes in isolation.
  • When used in performance testing, it removes the extra latency and processing time of publishing to SAP Commerce Cloud, thus providing more accurate results.
  • It can optionally write the generated ImpEx to a file on the file system.

Writing the Output of a Publication to a File

By default, SAP Commerce Cloud Test Adapter does not write to the file system. However, it can be configured to do so in the following way:
  1. Add the following property to your local.properties file:
    test-adapter.writer.enabled=true
  2. By default the adapter writes to the <USER_HOME>/impex directory. To change that, add the following:
    test-adapter.file.writer.directory=/Users/myUser/myImpex
  3. To configure the adapter to clean up the base directory when you restart Data Hub, add the following:
    test-adapter.file.writer.directory.cleanup=true
    If you have enabled cleanup, a restart removes all files in the base directory.

The name of the file is in the format: <targetsystemname>_<publicationActionId>-<targetsystempublicationid>-<random unique string>