Load Test Flash web applications
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.
This document is divided into following sections
- Creating Project
- 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
- Click on Start -> Programs ->AppPerfect Load Test x.x.x -> AppPerfect Load Test
- 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
- Launch the Project Wizard by clicking File ->New... menu option.
The New Project wizard will be launched.
- Keep the default project name and location for the purpose of this exercise. We don't have to provide
"Notification" settings. Click on the OK button.
- 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
- Once the project is successfully created another dialog - Define Project Properties dialog -
will be displayed.
- Change the default settings as shown in this dialog as Test Duration:1min,
Run Type:Loop, LoopCount:3, Virtual Users:1.
- Go through the description given for Loop run type at the bottom.
- Review other settings in the Panel and click on the OK button to close this dialog.
- 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.
- Click Help -> Table of Contents menu item to see AppPerfect Load Test product documentation
- Open the Preferences dialog by selecting the menu option Tools -> Options...
- Review the default settings for Load Test and click the OK button to close the dialog.
Exercise 2: Recording a Test
- To start recording, click on Project -> Record test... in the menu bar.'
- '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.
- 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.
- 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.
- Click on +/- sign to zoom in/out.
- Rotate the view by rotating the Compass provided on top right corner.
- 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.
- Each action performed sends a request to the server which is recorded by AppPerfect Load Test
- 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.
- 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
- Before executing the test, open the Preferences dialog by selecting the menu option Tools -> Options...
- Go to Log Settings and Select "Log Requests Fired" checkbox. Click on OK to save and close the dialog.
- Now you are ready to load test the server. Click on Project -> Run from the menubar.
- 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.
- Go to "LOADTEST_HOME/logs" folder and look for "request.txt" file.
- Open "request.txt" file in some editor and check the requests fired.