Known is a drop; Unknown is an Ocean



Adobe Flex is a software development kit released by Adobe Systems for the development and deployment of cross-platform rich Internet applications based on the Adobe Flash platform. Flex applications can be written using Adobe Flex Builder or by using the freely available Flex compiler from Adobe.

Developers use two core languages to create Flex applications. The first core language is MXML, the Macromedia Flex Markup Language, which includes a rich set of XML tags that allows developers to layout user interfaces. Some MXML constructs allow you to call remote objects, store data returned in a model, and customize your own look and feel to MXML components.

The second core language for Flex development is ActionScript 2.0, which is similar to JavaScript. ActionScript elements are coded inside MXML pages, has robust event handling capabilities to allow the application to respond to dynamic user interactions. Unlike JavaScript, since ActionScript runs inside the Flash plug-in there is no need to rewrite several versions of the same code to support different browsers.

The Flex server is responsible for translating the MXML and ActionScript components into Flash byte code in the form of .SWF files. The SWF file is executed on the client in the Flash runtime environment. The Flex server provides other services such as caching, concurrency, and handling remote object requests.



VuGen allows you to create Vusers that emulate the protocol suite provided with the Flex 2 SDK.


RIAs are lightweight online programs that provide users with more dynamic control than with a standard web page. Like Web applications built with AJAX, Flex applications are more responsive, because the application does not need to load a new Web page every time the user takes action. However, unlike working with AJAX, Flex is independent of browser implementations such as JavaScript or CSS. The framework runs on Adobe's cross-platform Flash Player. 




 2.    Environment Variables


Verify for the following environment variables in Windows Operating system.


The environment variables can be reached by following the below steps:


  1. Right-click “My Computer”. Go to properties.
  2. Go to Advanced Tab
  3. Click on the Environment Variables button


Click on the “New “button under System variables and enter the below values:


Variable name: HP_FLEX_JAVA_LOG_FILE

Variable value: C:\flex.log


Variable name: VUGEN_PATH

Variable value: C:\Program Files\HP\Virtual User Generator\


Variable name: ANALYSIS_PATH

Variable value: C:\Program Files\HP\LoadRunner\


* The HP_FLEX_JAVA_LOG_FILE is used to generate the log file which will help us to identify the classes involved in a particular transaction.

Trust me this log file will be very useful for debugging. Ensure that there are no errors in the flex log file after recording.



The following recording options need to be considered before recording in flex protocol:


  1. Go to Tools à Recording Options in LoadRunner.


  1. Under Script Check the check box against “Generate recorded event logs”. This setting helps to generate the log files for debugging.

  1. Under Protocols tab select all three check boxes viz.,


  1. Action Message Format (AMF)
  2. Flex
  3. Web(HTTP/HTML)




  1. Under Recording, select HTML based script.


Select HTML Advanced button and select “A script that contains explicit URLs only (e.g.web_url, web_submit_data)”  and “Record in separate steps and use concurrent grops” for Non HTML – generated elements. 





  1. Under Code generation select Encode AMF3 using external parser.


And provide the below jar files location under Value column.


  • flex-messaging-common.jar
  • flex-messaging-core.jar
  • (Any application specific jars.The jars are dependent on the transaction and should be verified before recording every transaction)




  1. Under Port-Mapping, click on Options. Under Advanced Port Mapping Settings à Change Log level to Advanced Debug.


This setting would enable to generate flex log in C:\ drive.




  1. The Advanced tab under HTTP properties is the standard one. 



  1. Under Correlation tab, uncheck the “Enable correlation during recording” check box.





After recording verify following:


  1. A file by name “flex. log” should be generated in C:\ drive.


  1. flex_amf_call should be generated with readable XML’s and not the binary format for all requests.

*********************** HAPPY SCRIPTING************************

Courtesy: HP