Verifying received data with custom Java code

With custom verification points, you can use Java code to verify the data received through a connection.

Before you begin

Using Java custom code requires knowledge of the Java programming language and of the Test Performance API. See Executing test execution with custom code for more information.

About this task

When you add verification points, the received data is compared with the expected data that is specified in the verification point test element. Custom verification points return a Pass status when the custom class returns a Pass status after performing a verification written in Java code.

Procedure

To add a custom verification point to a socket test:
  1. Open the test editor, right click a socket receive element, and select Add > Custom Verification Point.
  2. Select the verification point, and in the Test Element Details area of the test editor, click Generate Code.
    This action generates a Java class that is based on the template of the Test Performance API for socket custom verification points.
  3. Edit the Java code to define the specific verification action to perform.
  4. Save and close the Java class.

What to do next

To modify the custom class, click View Code to open the code in the Java editor. You can enable or disable each socket verification point by clicking Enable verification point in the test editor.