AMF Protocol Overview in HP LoadRunner

In this blog post, we will learn about AMF Protocol, AMF Terms, sample script and recording mode of AMF Protocol in HP LoadRunner.

HTTP is the preferred method of communication between client and server. For the secure way of communication, SOAP (Simple Object Access Protocol) over HTTP, an XML based format is useful. But the limitation of SOAP over HTTP is: it cannot transfer large files such as Rich Internet Applications, Flash files etc.

Hence Macromedia created proprietary protocol called Action Message Format (AMF) protocol which communicates over HTTP in binary format. This binary AMF data is smaller than SOAP’s XML.

AMF Protocol Overview Client Server
AMF Protocol Overview Client Server

Client application (computer, mobiles, tablets etc) submits AMF messages over HTTP to the application server. Flash players from the client application sends native Flash objects to an application server via a gateway called Flash Remoting Gateway which is a server-side object (which is installed either in Java (ColdFusion) or in .NET).

This gateway acts as an intermediator that handles request between client and the server. It translates the objects and serves the appropriate services.

Once the requests processed, the gateway serializes back into native Flash objects and send them to the client application.

Action Script – a scripting programming language (similar to Javascript) is used to control Flash movies and application.

Below is the sample AMF script:





    "Data=<object><boolean key=\"coldfusion\">true</boolean>

                  <boolean key=\""    "amfheaders\">false</boolean>...










    "<xmlString><![CDATA[<TEST message=\"test\"><INSIDETEST





Recording Settings for AMF Protocol

You can use following protocol combinations to record:

  • AMF Only
  • Web Only
  • AMF and Web
AMF Protocol Overview Recording Options
AMF Protocol Overview Recording Options

Commons Issues you face in AMF protocol

When you record Flex applications using AMF protocol, sometimes VuGen might not be able to decode externalizable objects. To overcome this issue, go to Recording Options, click on Code Generation under AMF Protocol and check Encode externalizable object with LoadRunner parser as shown below and then click on OK.

AMF Protocol Overview AMF Code Generation
AMF Protocol Overview AMF Code Generation

VuGen generates Custom Request functions containing unparsed AMF3 binary data.

AMF Protocol Overview - Client Server

1 thought on “AMF Protocol Overview in HP LoadRunner”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Join the fastest growing Performance Engineers club at ClubhouseSHOW ME HOW
+ +
Share via
Copy link