Load Testing

Flash application Load Testing

Flash has become a popular method for adding animation and interactivity to web pages. Flash is commonly used to create animation, advertisements, and various web page components, to integrate video into web pages, and more recently, to develop rich Internet applications. Flash can manipulate vector and raster graphics and supports bidirectional streaming of audio and video. It contains a scripting language called ActionScript. Several software products, systems, and devices are able to create or display Flash content. Any user who is building a web application that uses Flash or flash components will also be interested in knowing the load its server can handle.

We are going to use Flash Earth for this tutorial. This site provides aerial and satellite view of our planet Earth from multiple sources inside a single Flash interface.

This tutorial provides a brief introduction to load testing Flash applications using AppPerfect Load Test with hands-on practice exercises. This tutorial assumes you have successfully downloaded and installed AppPerfect Load Test on your machine with the default options and you are connect to Internet. Apart from this pre-requisite, this tutorial is self contained. Instructions given below are Windows-specific; if you are using a non-Windows machine, please use equivalent commands/instructions.

Note: The application "Flash Earth" is used only for demo purpose and must not be used to run test with more than 1 virtual user. Also the test duration must not be more than 1 minute.

This document is divided into following sections

  1. Creating Project
  2. AppPerfect Load Test

Within each section, multiple exercises are listed. Each exercise forms a logical unit which is expected to take no more than a few minutes to perform. All exercises use Flash Earth site.

All exercises assume you have installed the product in C:\AppPerfect\LoadTest folder and will be referred as LOADTEST_HOME henceforth in tutorial. If you have installed the product in some other folder, modify the instructions below appropriately.

This tutorial is not intended as a comprehensive training guide. Please refer to the product documentation for detailed information. However, this tutorial will give you a very good overview of the products and substantially improve your productivity with the product.

Creating Project

Exercise 1: Launch AppPerfect Load Test
  1. Click on Start -> Programs ->AppPerfect Load Test x.x.x -> AppPerfect Load Test
  2. On launching AppPerfect Load Test a Welcome page will be displayed. Go through various sections provided in the welcome page.
    NB: Welcome page is displayed only when Load Test x.x.x is launched and last time no project was opened.
Exercise 2: Creating a Project
  1. Launch the Project Wizard by clicking File ->New... menu option. The New Project wizard will be launched.
  2. Keep the default project name and location for the purpose of this exercise. Click on the OK button.
  3. A confirmation message saying that the project is saved will be displayed. Click on the OK button.

Now using this project we will create tests to demonstrate the functionalities of AppPerfect Load Test product.

AppPerfect Load Test

NB: Please follow the steps provided in the "Creating Project" section to first create a project, then proceed further.

Exercise 1: Define a Load Test project
  1. Once the project is successfully created another dialog - Define Project Properties dialog - will be displayed.
  2. Change the default settings as shown in this dialog as Test Duration:1min, Load Type:Loop, Loop Count:3, Virtual Users:1.
  3. Go through the description given for Loop load type at the bottom.
  4. Review other settings in the Panel and click on the Finish button to close this dialog.
  5. Click through all the menu items to familiarize yourself with the available features and how to access them. Viewing through all menu items will give a reasonable overview of the application.
  6. Click Help -> Table of Contents menu item to see AppPerfect Load Test product documentation
  7. Open the Preferences dialog by selecting the menu option Tools -> Options...
  8. Review the default settings for Load Test and click the OK button to close the dialog.
Exercise 2: Recording a Test
  1. To start recording, click on Project -> Record test... in the menu bar.'
  2. 'Record a test' dialog will be displayed. Select ActionGroup1 from the Group combo. Provide starting URL as "http://www.flashearth.com". Now Click on 'Start recording' button to start recording.
  3. An instance of configured browser will be launched with the Flash Earth's home page loaded. This home page shows aerial view of Earth and informs us to drag the mouse to look around the map and use other controls to rotate or zoom in/out.
  4. Keep a watch on the no. of tasks that have been recorded in Load Test. Drag the mouse to view your continent first and then to view your country.
  5. Click on +/- sign to zoom in/out.
  6. Rotate the view by rotating the Compass provided on top right corner.
  7. Click a pointer next to Search which expands it. Enter a location of your choice for e.g. California. Press Enter. You will now see the satellite view of California.
  8. Each action performed sends a request to the server which is recorded by AppPerfect Load Test
  9. Check the recorded tasks in the Editor tree. You may find that some of the numbers are missing while naming the tasks. The reason is, say you see Task1 and after that Task21, all the in-between tasks are actually sub-tasks of Task1. Select Task1 node in the tree and on the RHS, select Sub-Tasks tab. You will find all the sub-tasks of Task1. Check the URLs, you will find something of this sort: http://wms.jpl.nasa.gov:80/wms.cgi.
  10. Click on Edit button to view the details of this task. Check URL Path parameters tab for the parameters sent by this request. For e.g. parameters are request=GetMap&bbox=45,0,90,45&format=image/jpeg etc. It is request for the map view for 45 deg latitude and 90deg45" longitude etc. Each request is to get satellite view of some portion of the screen.
Exercise 3: Executing a test
  1. Before executing the test, open the Preferences dialog by selecting the menu option Tools -> Options...
  2. Go to Log Settings and Select "Log Requests Fired" checkbox. Click on OK to save and close the dialog.
  3. Now you are ready to load test the server. Click on Project -> Run from the menubar.
  4. Check the status of the test in Status view. Once the execution completes, you will be taken to Result's view where you can view the test execution results.
  5. Go to "LOADTEST_HOME/logs" folder and look for "request.txt" file.
  6. Open "request.txt" file in some editor and check the requests fired.