13 June 2011
Familiarity with the HTTP protocol is recommended.
Intermediate
Consider a situation in which your company has developed a Flex 4.5 application that communicates with a server component such as BlazeDS or Adobe LiveCycle ES. You know that many potential issues (network settings, pool size, and poor design, among others) may result in unacceptable response times or an application failure when many users access the application simultaneously.
In situations like this, NeoLoad can help you ensure that your application will perform well under load. NeoLoad is a load testing software solution designed for web applications. It simulates a large number of users simultaneously interacting with the application and measures response times, errors, and other performance characteristics.
This tutorial describes how to load test the Inventory Management application included in the BlazeDS samples with NeoLoad. Although it does not cover all the processes and methodologies required for load testing in real-life situations, it provides a good introduction to the basics of load testing in a Flex environment.
The typical steps in a load test are:
This article will cover each of these steps. Be sure to download and install BlazeDS and NeoLoad (a 30-day evaluation version is available) before beginning.
In this section, you will record a user searching for a telephone in the inventory.
NeoLoad will create the new project (see Figure 1).
Follow these steps to record a user profile:
You can see that the AMF (binary protocol) call is decoded by NeoLoad and displayed in plain XML. The search criteria you typed while recording appears as a parameter of the getProductsByName operation: <String>N</String>.
In this section, you will learn how to parameterize your requests by replacing a recorded value with another appropriate value.
Why parameterize your requests? Generally speaking, requests must be parameterized for the two following reasons:
Without a load testing tool that can understand AMF it would be impossible to edit parameters, and thus impossible to parameterize a load testing script for any application that uses AMF to exchange data between the client and the server. The ability to understand binary protocols is a key capability for load testing tools.
This section describes how to create a variable that can be used to test different search criteria.
Now you can use the newly created variable with several search criteria to parameterize the search request.
<operation>getProductsByName</operation>. Under the <parameters> node, replace the recorded content <String>N</String> with <String>${search.criteria}</String> (see Figure 6).
In this section, you will launch a test simulating several users accessing the server.
Note: Generating more than 10 simultaneous users requires a commercial license for NeoLoad.
At the end of the test, NeoLoad automatically switches to Results view and displays a report with key graphs and statistics (see Figure 12) so you can quickly see if your application handled the load. The main items to check are:
NeoLoad provides graph tools, statistics, and error reports to help you check results against your performance requirements and search for the causes of any bottlenecks.
Now that you have learned the basics of load testing a Flex application, you can get more information on the Neotys website:

This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.