Testing a Message Mapping 
You use this procedure to check whether a complete message mapping functions at runtime once you have described it. For this purpose, the mapping editor generates, compiles, and then executes Java source code for the message mapping.
The defined message mapping must be complete. This means that each mandatory target field must be assigned to one or more source fields. Furthermore, there must not be any unassigned arguments when using functions.
To test mapping programs in ES Repository, users require the either of the roles SAP_XI_ADMINISTRATOR_J2EE, SAP_XI_CONTENT_ORGANIZER_J2EE, SAP_XI_CONFIGURATOR_J2EE or SAP_XI_DEVELOPER_J2EE.
Select Message Mapping object from the required software component version.
From the context menu, select
You can apply values in the XML editor and save them along with created XML file.
To execute a message mapping, you require a test configuration that is valid according to your description of the source structure.
Test configuration can be done in two ways:
Choose the message mapping object right-click .
Note
This step executes the test configuration (if one exists).
Run Configurations dialog opens with Object Details prefilled, if there is no configuration existing for message mapping.
Choose the message mapping object, right-click .
Note
This launches Run Configurations dialog, you can right-click on ESR Message Mapping and choose New to create new Test Configuration.
You can save the run configuration using Apply button, which keeps the run configuration saved on eclipse workspace and loads it when Run Configuration dialog is launched.
XML instances can be created from Message Mapping object by using , which can be used in different test configurations.
Using the XML editor, you can manually edit elements, attributes and their values.
The mapping runtime sets some constants that the mapping programs can use to evaluate header fields in the source message.
Switch to “Parameters” tab for entering parameters values.
Note
Here you can see the list of Importing and Header Parameters.
Enter values for parameters and select values in case of “Adapter” type parameter.
Note
At design time, the mapping runtime constants are not available. For test purposes, however, you can set these constants on the Parameters tab page (located at the Test Configuration of the Parameters tab page). The various data records for test parameters are saved along with the test configuration in workspace.
Once you have loaded, generated, or entered an XML instance, in the mapping editor you can save the instance. The test configurations are saved in eclipse workspace.
To test mapping using the XML instance, click Run button, which is available in Run Configurations dialog.
Note
All the traces are logged into the error login eclipse (Debug, Information, and Warning).
If you are testing the message mapping for the first time or have modified it after the last test, the test execution compiles the generated Java source code. The result of the transformation is displayed in the test result editor. Any errors that occurred during compilation are shown in the dialog and logged into the eclipse error log.
On the document page of editor the result output XML is shown and in the parameters page the exporting parameters are shown along with their values (if any).