Creating custom data transformations

You can create your own data transformations to transform binary data in tests. Data transformations can convert binary data to a more readable format and can assist with data correlation.

Before you begin

To create a data transformation, you must be familiar with developing Java methods in Eclipse.

Procedure

To create a data transformation:
  1. Click File > Switch Workspace > Other, and then type a workspace name to create a new workspace.
    The product restarts in the new workspace.
  2. Extract the MyTransformProject.zip archive file.
    The MyTransformProject.zip archive file contains the MyNewDataTransformFeature and MyTransformProject projects . By default, this file is installed in the C:\Program Files\IBM\IBMIMShared\plugins\com.ibm.rational.test.lt.sampleversion_date\install C:\Program Files\HCL\HCLIMShared\plugins\com.ibm.rational.test.lt.sampleversion_date\installdirectory.
  3. Import the MyNewDataTransformFeature and MyTransformProject projects into the new workspace.
    See Importing existing projects for more information about importing projects.
  4. Click Window > Open Perspective > Resource to open the Resource perspective.
  5. Open the MyTransformer.java file for editing.
  6. Implement the transformData and unTransformData methods to create your data transformations.
  7. Optional: If you need other .jar files to implement your transformations, add the .jar files to a user library.
    1. Right-click the MyTransformProject project in the Resources view, and then click Build Path > Configure Build Path.
    2. Click the Libraries tab.
    3. Click Add Library.
      The Add Library window opens.
    4. Select User Library, and then click Next.
    5. Click User Libraries.
    6. Click New, and then type a library name.
    7. Click Add JARs, and the select the .jar files to add.
    The code in the .jar files is now available to the MyTransformProject project.
  8. Start another copy of the workbench to debug your transformations.
    To learn more about debugging, see Local Debugging in the Eclipse documentation.
    1. Click Run > Debug Configurations.
    2. Select Eclipse Application.
    3. Click the New launch configuration icon.
    4. Edit the new configuration, and then click Debug.
  9. In the copy of the workbench started for debugging, record a test, and then open the test for editing.
  10. Click Edit > Data Transformation.
    The Select Transformation Adapter window opens. The MyTransformer transformation is listed along with the default transformations supplied with the product.
  11. Select the MyTransformer transformation, and then click OK.
    Data correlation is removed when you apply a transformation. To correlate the test data again, click Edit > Re-correlate test data.
  12. Right-click MyNewDataTransformFeature, and then click Export.
  13. Select Plug-in Development > Deployable features, and then click Next.
    The Deployable features window opens.
  14. Select MyNewDataTransformFeature.
  15. On the Destination page, type or click Browse to specify a directory, and then click Finish.
    The installable feature is exported to the specified directory. The exported files can be compressed into archives to make it easier to copy them to other computers.