Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Flex Developer Center /

Load testing Flex applications with NeoLoad

by Christophe Marton

Christophe Marton
  • www.neotys.com

Content

  • Step 1: Recording a typical user
  • Step 2: Parameterizing the virtual user profile
  • Step 3: Running the test
  • Step 4: Analyzing the results
  • Where to go from here

Created

13 June 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
AMF Flex performance RIA testing

Requirements

Prerequisite knowledge

Familiarity with the HTTP protocol is recommended.

User level

Intermediate

Required products

  • Flex (Download trial)

Additional required products

  • NeoLoad
  • BlazeDS

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:

  1. Record a user interacting with the application
  2. Parameterize the virtual user profile
  3. Run the test
  4. Analyze the results

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.

Step 1: Recording a typical user

In this section, you will record a user searching for a telephone in the inventory.

Create the NeoLoad project

  1. Start NeoLoad and choose File > New.
  2. Type InventoryManagement as the project name and click Finish.

NeoLoad will create the new project (see Figure 1).

The NeoLoad user interface after creating a new project.
Figure 1. The NeoLoad user interface after creating a new project.

Record a user profile

Follow these steps to record a user profile:

  1. Choose Record > Start Recording.
  2. Type SimpleUser as the virtual user profile name and click OK (see Figure 2).
Setting up a new user profile.
Figure 2. Setting up a new user profile.
  1. In your browser, type the URL for the Inventory Management application. For example, type http://localhost.:8400/samples/inventory/index.html. Note that a period is required after "localhost" when recording with Internet Explorer.
  2. Type N in the search field, and then select a phone in the list (see Figure 3).
Selecting a phone in the Inventory Management sample application.
Figure 3. Selecting a phone in the Inventory Management sample application.
  1. Close the browser or choose Record > Stop Recording in NeoLoad to stop the recording.
  2. In the Virtual Users tab, expand Virtual User Profiles > SimpleUser > CLIENT_PING and select getProductsByName (see Figure 4).
Examining the recorded interaction.
Figure 4. Examining the recorded interaction.

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>.

Step 2: Parameterizing the virtual user profile

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:

  • Realistic testing. All your real users won't perform the same actions. You need to simulate users performing different actions on a variety of items otherwise your application will always be using cached data and the performance rating will be artificially high. Using varied data ensures that all layers of the application are properly tested. For typical applications, the cache levels are: application (server-side), database, operating system, and hard disk.
  • Application identifiers. Consider a scenario in which a user first creates an item and then edits it. The editing panel usually refers to the edited item using an identifier that is submitted with the modifications. Simulating such behavior requires the identifier to be extracted from the server response after creation and then injected into the request that carries out the modification. (This process is beyond the scope of this tutorial.)

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.

Create a new variable

This section describes how to create a variable that can be used to test different search criteria.

  1. Choose Edit > Variables in NeoLoad.
  2. Click New Variable.
  3. Select the List item in the list.
  4. Type search as the variable name.
  5. Click the table header and rename the first column as Criteria.
  6. Select For Each Virtual User as the Value Change Policy.
  7. Type some values for the search criteria; for example, a, aa, b, bb, n, no. Click Add Value for each new value (see Figure 5).
Creating a new variable.
Figure 5. Creating a new variable.
  1. Click OK to close the Create Variables dialog box.
  2. Click OK to close the Edit Variables dialog box.

Using the variable to change the request parameters

Now you can use the newly created variable with several search criteria to parameterize the search request.

  1. In the Virtual Users tab, expand Virtual User Profiles > SimpleUser > CLIENT_PING and select getProductsByName.
  2. To edit the XML request, scroll down until you find <operation>getProductsByName</operation>. Under the <parameters> node, replace the recorded content <String>N</String> with <String>${search.criteria}</String> (see Figure 6).
Editing the request to include the variable.
Figure 6. Editing the request to include the variable.
  1. Click Apply.

Step 3: Running the test

In this section, you will launch a test simulating several users accessing the server.

Set up the scenario

  1. Click Runtime (see Figure 7).
Click Runtime to set up a new scenario.
Figure 7. Click Runtime to set up a new scenario.
  1. Set the duration of the test. Use 10 minutes, for example (see Figure 8).
Setting a 10 minute test duration.
Figure 8. Setting a 10 minute test duration.
  1. To set the load variation policy, select the Ramp Up option. Start with one user initially, and increment by one new user each minute (see Figure 9). Select Maximum Number Of Users and type 10 as the maximum number.

Note: Generating more than 10 simultaneous users requires a commercial license for NeoLoad.

Setting the load variation policy.
Figure 9. Setting the load variation policy.

Launch and supervise the test

  1. To begin the test, Click Start (see Figure 10).
Starting the test.
Figure 10. Starting the test.
  1. Use the different tabs to display real-time information on the test as it executes (see Figure 11).
Real-time test results.
Figure 11. Real-time test results.
  1. Wait for the test to finish or click Stop to terminate it.

Step 4: Analyzing the results

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:

  • Errors. If you see any errors, analyze the error type (for example, network error, server internal error 500, and so on) and details to identify the cause. Performance monitors can help in this process.
  •  Response times. Check to see if the response times for your requests or business transactions meet your performance requirements (for example, you may want to ensure that each user’s login time is less than five seconds).

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.

Load test results.
Figure 12. Load test results.

Where to go from here

Now that you have learned the basics of load testing a Flex application, you can get more information on the Neotys website:

  • General information
  • Demos and technical information on load testing Flex applications
  • Tutorial on Adobe Flex/AMF: Handling polling and streaming
  • LiveCycle Data Services ES monitoring.

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

More Like This

  • Using automated tools across the lifecycle to develop higher quality Flex applications
  • Increasing Flex and ActionScript development productivity with Flash Builder 4.5 and SourceMate 3.0
  • Improving Flex application performance using the Flash Player cache
  • Creating a rich buying experience with a data-driven RIA
  • Flex Solutions excerpt: Migrating Flex applications onto the desktop with Adobe AIR
  • Building a portable RIA with Flex and PDF
  • Creating a basic CRUD application using Flex and PHP with Zend AMF
  • Debugging Flex 4 applications – Part 2: Breakpoints
  • Debugging Flex 4 applications – Part 3: Variables view, watchpoints, and Run to Line
  • Flex mobile development tips and tricks – Part 2: Styling your application's tabs and ActionBar

Tutorials & Samples

Tutorials

  • Flex mobile performance checklist
  • Flex and Maven with Flexmojos – Part 3: Journeyman
  • Migrating Flex 3 applications to Flex 4.5 – Part 4

Samples

  • Twitter Trends
  • Flex 4.5 reference applications
  • Mobile Trader Flex app on Android Market

Flex User Forum

More
07/25/2011 Flash Player Debug Issues - Safari 5.1 & Chrome 13
04/22/2012 Loader png - wrong color values in BitmapData
04/22/2012 HTTPService and crossdomain.xml doesn't work as expected
04/23/2012 Memory related crashes in Flex application

Flex Cookbook

More
04/06/2012 How to detect screen resize with a SkinnableComponent
02/29/2012 Embed Stage3D content inside Flex application components
02/15/2012 Custom WorkFlow Component
02/09/2012 Using Camera with a MediaContainer instead of VideoDisplay

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement