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 IBM® DevOps Test Performance (Test Performance) extension API.
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.
To create a new custom code class:
- In the test editor, select a socket send element.
-
Select Manipulate data with custom code and click Generate
Code.
This creates a Java class template that follows
the Test Performance extension API. The Java class in created in the
src folder of the current project.
-
Write the custom code by extending the generating class. See Extending
test execution with custom code for more information about extending Test Performance with Java code.
- Save the custom code and the test.
You can click View
Code to edit the Java class
later.