Adobe RTMP: Handle external libraries

Note: This feature uses Adobe Flex libraries, which NeoLoad no longer supports due to security concerns. If you wish to continue using this feature at your own discretion, please reach out to Tricentis support for help getting it back.

This tutorial describes how to design a Virtual User containing Adobe RTMP requests. It introduces you to the Post-Recording Wizard, which is used to instruct NeoLoad how to decode the Adobe RTMP requests. If you do not have all the required files during the recording, this tutorial explains how to repair Adobe RTMP requests that could not be decoded.

To gain the most from this tutorial, it is recommended to read the following sections beforehand:

Understand the context

In the same way that it allows HTTP exchanges to be defined and tested, NeoLoad also provides a method of load testing RTMP requests. RTMP requests are similar in many ways to standard HTTP requests. This means that all the NeoLoad features available for testing HTTP requests can also be used for RTMP requests. These include, among others, the use of variables, defining assertions and, of course, obtaining results for the tests.

Record RTMP requests

To record RTMP requests, see Record a test scenario and check RTMP in the recorded protocols.

Note: There are certain limitations regarding the recording of RTMP applications in NeoLoad. For more information, see Limitations.

For the record, the RTMP protocol enables the carrying of data including customized objects (encoded using AMF protocol), audio and/or video. If the Java object classes are missing, the request binary data cannot be decoded for conversion to XML. The following procedure explains how to solve the problem of missing Java classes.

Note: In Java, an object is termed externalizable when it implements the java.io.Externalizable interface. These objects are particular, in that they manage the saving and restoring of their attribute values themselves. Declaring these Java classes using Adobe RTMP libraries manager is mandatory.

To record RTMP requests, follow these steps:

  1. When you close the browser, the Post-Recording Wizard is displayed.

  2. Select the JAR files to declare.

  3. Repeat the operation as required.

  4. Once all the necessary JAR files have been loaded successfully, a confirmation screen is displayed.

During recording, NeoLoad detects that RTMP channels have been created and offers to create a copy of the Virtual User that will allow the scenario to be run. The RTMP channels are blocking actions pending reception of the server messages. To be able to simulate a user using RTMP, you need to create this simplified Virtual User. For more information, see RTMP channel.

When copying the Virtual User, NeoLoad inserts the RTMP channels in Fork actions and creates the various types of Push message received during the recording.

For more information about the next steps in the wizard, see Post-recording wizard.

Fix an RTMP request after recording

The JAR files required by an RTMP request may be declared at any time.

Here, the request selected in the Virtual User requires Java classes that have not been declared yet. This fact is revealed by several indicators:

  • The request icon in the Virtual User.

  • The request contains unexpected characters, instead of XML.

  • A link (in blue) indicates that the RTMP Java libraries for this request are missing.

To fix an RTMP request after recording, follow these steps:

  1. Click on the link (or use Edit > Preferences > Project settings > Libraries Manager > Adobe RTMP) to declare the required RTMP Java libraries

  2. Click the + (plus) button to open the file explorer.

  3. Select the JAR file to declare.

  4. If the JAR file loads correctly, a dialog box confirms that the AMF library has been successfully declared.

  5. The loaded JAR file appears in the list and a message informs you that the process was successfully completed.

  6. If the request still has not been converted to XML format, it means that some required JAR files still have not been declared. Repeat the operation as many times as is necessary.