Using custom code to manipulate data

You can write a custom Java class to manipulate data in a send element. This offers flexibility for injecting data in test, but requires that you write your own Java class using the Rational® Performance Tester extension API.

Before you begin

In some cases, complex methods of generating data are required to send specific content to the server. This can be done by manipulating data with custom code.

Procedure

To create a new custom code class:
  1. In the test editor, select a socket send element.
  2. Select Manipulate data with custom code and click Generate Code.
    This creates a Java class template that follows the Rational® Performance Tester extension API. The Java class in created in the src folder of the current project.
  3. Write the custom code by extending the generating class. See Extending test execution with custom code for more information about extending Rational® Performance Tester with Java code.
  4. Save the custom code and the test.
    You can click View Code to edit the Java class later.