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:
- Click , and then type a workspace name to create a new workspace. The product restarts in the new workspace.
- 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 directory.
- Import the MyNewDataTransformFeature and MyTransformProject
projects into the new workspace. See Importing existing projects for more information
about importing projects.
- Click to open the Resource perspective.
- Open the MyTransformer.java file for
editing.
- Implement the transformData and unTransformData methods
to create your data transformations.
- Optional: If you need other .jar files to implement your transformations, add the .jar files to a user library.
- Right-click the MyTransformProject project in the Resources view, and then click .
- Click the Libraries tab.
- Click Add Library. The Add Library window opens.
- Select User Library, and then
click Next.
- Click User Libraries.
- Click New, and then type a library
name.
- Click Add JARs, and the select
the .jar files to add.
The code in the .jar files is now
available to the MyTransformProject project.
- Start another copy of the workbench to debug your transformations. To learn more about debugging, see Local Debugging in the Eclipse documentation.
- Click .
- Select Eclipse Application.
- Click the New launch configuration icon.
- Edit the new configuration, and then click Debug.
- In the copy of the workbench started for debugging, record
a test, and then open the test for editing.
- Click . The Select Transformation Adapter window opens.
The MyTransformer transformation is listed along with the default
transformations supplied with the product.
- Select the MyTransformer transformation, and then click OK. Data correlation is removed when you apply
a transformation. To correlate the test data again, click .
- Right-click MyNewDataTransformFeature, and then click Export.
- Select , and then
click Next. The Deployable features window opens.
- Select MyNewDataTransformFeature.
- 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.