+

Search Tips   |   Advanced Search

Adobe Flex/AMF: Handle external libraries

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

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


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 AMF requests. AMF 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 AMF requests. These include, among others, the use of variables, defining validations and, of course, obtaining results for the tests.


Record AMF0 requests

To record AMF requests, see Record a test scenario.

  • Recording AMF0 requests is straightforward and requires no configuration.


    Record AMF3 requests

    To record AMF requests, see Record a test scenario.

    For the record, the AMF3 protocol enables the carrying of customized objects. 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.

      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 Flex/AMF libraries manager is mandatory.

    • To record an AMF3 request

    1. When you close the browser, the Post-Recording Wizard is displayed.
    2. Select the JAR/XML files to declare.
    3. Repeat the operation as required.
    4. For more information about the next steps in the wizard, see Post-recording wizard.


    Fix an AMF3 request post-recording

    The JAR files required by an AMF 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 AMF Java libraries for this request are missing.

    • To fix an AMF3 request post-recording

    1. Click on the link (or use Edit > Preferences > Project settings > Libraries Manager > Adobe Flex/AMF) to declare the required AMF Java libraries.
    2. Click the + (plus) button to open the file explorer. Select the JAR file to declare.
    3. If the JAR/XML file loads correctly, a dialog box confirms that the AMF library has been successfully declared.
    4. The loaded JAR/XML file appears in the list and a message informs you that the process was successfully completed.
    5. 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.


    Home