Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Key challenges in flex based performance testing
1. 1
Key Challenges in Flex based Performance
Testing
Authors
Phanindra Kishore Satyaprasad Email: phanindrakishore.s@avacorp.biz
Naveen Kumar Jagatabi Email: naveenkumar.jagatabi@avacorp.biz
Rupa Sureshkumar Email: rupa.sureshkumar@avacorp.biz
AVACorp Technologies Pvt. Ltd
East West Centre, 3rd & 4th Floor,
#128, Nelson Manickam Road,
Aminjikarai,
Chennai - 600 029
Phone: +91-44-23741122
2. 2
Abstract
Flex is the next generation RIA defined by a visual paradigm and is epitomized by the
presence of rich content. With ground-breaking RIA technologies that are redefining the
way we use the Web, there are so many new-fangled challenges that need to be tackled.
For successful deployment of Flex applications, these fresh challenges need to be
addressed. Flex allows a plethora of server integration options with remarkable
interoperability with many data formats, languages, and protocols. Due to this, one of
the predominant challenges that need major attention is to scrutinize the performance of
the flex applications.
With flex technology, you need to think about performance testing in an innovative way.
The main objective of this white paper is to address the challenges in Flex adoption and
suggest a route map for selection & utilization of an appropriate Flex based performance
testing tool. The article also deals with why load testing Flex based applications is the
need of the hour and points out the important considerations while working with Flex. It
also provides adequate suggestions on some of the parameters that can be fine-tuned
for improving the quality of the application. Additionally, the basics of Flex are explained
in colossal detail.
The white paper is useful for test managers and test leads focusing on acquiring
appropriate performance testing tools for Flex based applications.
Introduction
In the present day global business milieu, clientele is progressively more demanding by
the day. To keep up with such challenging expectations, deep customer commitment is
vital to an organization’s success. RIAs whether they are based on AJAX, Flex or
Silverlight, all have a common purpose to provide an improved user experience. Rich
Internet Applications (RIAs) like flex augment customer satisfaction and are redefining
the way we use the Web due to its dynamic, interactive and engaging features.
Forrester Research published “The Business Case for Rich Internet
Applications”. The report revealed that "well-designed RIAs can produce eye-
popping results that can help prove the value of current investments and make
the case for future RIA projects". Having stated such peak demands of RIAs that
incorporate complex technologies, it is imperative that the QA team comes up with a well
designed approach with an appropriate tool in place for performance testing Flex based
applications.
3. 3
Flex Overview
According to Adobe: http://www.adobe.com/products/flex/
“Flex is a highly productive, free, open source framework for building expressive web
applications that deploy consistently on all major browsers, desktops, and operating
systems”.
Understanding the fundamentals of Flex (from Performance
testing Perspective)
Extensive usage of Flex is because it can be deployed across platforms and it is OS
independent. It runs on Flash player and you are virtually guaranteed that anyone with a
Flash player installed can use it. Since Flex outputs its data as a .swf and runs on Flash
player, it can utilize its exciting features such as dynamic animations, sound and video
handling. It is pretty much the only platform that could be written once and deployed
everywhere compared to other contemporary RIA technologies. The actuality that
complex and more secure websites could be easily created using Flex compared to its
RIA counterparts is what makes Flex so interesting and in top demand. Besides all these
advantages, the best one is that Flex is open source.
Fig. 1 RIA Technologies
Technology overview
Flex is written using the ActionScript language and the protocol supported by Flex is
Action Message Format (AMF). AMF is the protocol that enables communication between
the flash application and the server. It is a binary format that is used to serialize
ActionScript objects.
Flex has two variations of the AMF protocol.
AMF0 is used in Flex applications written in ActionScript 1.0 & 2.0. and
AMF3 is used in Flex applications written in ActionScript 3.0.
4. 4
Flex uses the remoting service to make Remote Procedure calls (RPC) to improve
application performance. The exchange of information between the application
and the server is done via RPC.
Fig. 2 Flex communication Architecture.
Flex uses the AMF protocol and updates client data in two ways:
Polling method: the browser queries the server at regular intervals. Though
this method is quite simple in enforcement, it is also depreciatory at the same
time because it needlessly overloads the server and is not very responsive.
Streaming method: here the client sends a single request to the server, and
the server responds when the relevant information is available, without
ending the request. In this way, the server can again send information to the
client using the same connection instead of waiting to establish a new request
and the client data is updated rapidly while the network traffic is kept
minimal.
Fig.3: Demonstrates the contrast between Polling and Streaming communication
mechanisms. The interaction between the client and server is illustrated.
5. 5
Flex vs. HTML
In the traditional applications that deliver HTML as the user interface, the server does all
the processing and the users simply page back and forth to the server. They deploy the
pull principle. However, Flex applications are quite different. It downloads the flash client
application and runs in the browser. They only go back to the server periodically to
request or send data. Flex deploys polling and streaming technology for communication
between the application and the server. Also, it uses asynchronous server
communication because it has total control over the state and functionality of the
application and it can communicate with the server independently. For this reason,
server loads unveil a very different profile.
Performance Testing Flex applications – The need of the hour!
Since Flex is a new technology, the collection of best practices and familiarity with Flex is
still in its premature stage. Flex applications provide a rich, interactive user experience
which requires more data intensive exchanges and poses new-fangled challenges in the
data management between client and server systems. Due to such intricacy of Flex
applications, it has more potential for performance bottlenecks than a typical web
application. Therefore, to make certain that a Flex application will meet the business
requirements and function as desired, an end to end testing of the application from the
end user’s standpoint is necessary. This kind of testing should incorporate many
recurring cycles of performance testing to ensure the stability of the application and to
fine tune its performance. By doing so, the real-life behaviour of the Flex application can
be understood which helps in identifying instabilities, errors and bottlenecks under
scaling user loads. Typically, performance testing Flex based applications will help you
identify.
Potential bottlenecks prior to its release. It helps in identifying where it could go
wrong.
Behaviour pattern under normal conditions and under heavy loads. The response
of the application under normal conditions such as minimal load scenario and
under scaling loads can be identified.
Helps in tuning the application for maximum performance. By determining where
the application slow down is happening, performance tuning can be done to
improve performance.
Reduction in cost due to identification of potential performance problems that
could cause application failure / slow down.
Flex applications – Drawbacks in existing tools
One of the predominant challenges lies with the lack of availability of a lot of tools
for performance testing Flex based applications. Most performance testing tools
don’t recognize the Flex objects and the AMF protocol. It requires tools with Flex
6. 6
support / module. There are very few tools in the market that recognize the AMF
protocol and offer Flex support.
In addition to basic Flex support for recording, a tool needs to meet an
assortment of technical requirements for carrying out full-fledged performance
testing operations. Considering these factors the tool selection process is quite
intricate. The tool requirements are elucidated in detail under the ‘Tool selection -
Key considerations’.
Another challenging factor is the support for the latest versions of Flex. Very few
vendors of the existing tools that offer Flex support have released the support for
the latest version of AMF / Flex. And the tools that support the latest versions are
mostly proprietary tools and their license costs high. Open source tools provide
very limited support.
It is difficult to determine if a tool is actually recording the AMF protocol and if it
is capable of playing back the same. Mostly, technical hitches are encountered
while doing a host of performance testing operations like parameterization,
correlation and generation of modified virtual users and checking for validation of
the response for the recorded Flex application.
Due to its recent emergence and deployment in market, there is very limited
collection of best practices and reference documents that elucidate in detail the
performance testing of Flex based applications using appropriate tools. Also,
there are only a handful of skilled resources with technical expertise in the area of
Flex performance testing.
Tool selection - Key considerations
As discussed earlier, Flex uses the AMF protocol to exchange data between the client and
the server using the Remote Procedure Call (RPC) method. RPC is basically employed to
perk up the performance of Flex applications. The inability to recognize the AMF protocol
by most performance testing tools is a major drawback. Most tools are acquainted with
how content is sent over the HTTP but fail to understand the data exchange between
client and server systems when it comes to flex. To achieve success with Flex projects,
identifying the right tool which has a dedicated module for Flex is of principal
importance. The primary condition being the ability of the tool to intelligently record the
AMF protocol. For full-fledged Flex support, make sure the tool ropes in the following
technical requirements.
It should support automatic processing of internal identifiers and serialized
objects and it should display the latter in order to edit, view and validate the
results.
7. 7
The support of polling and streaming and a push framework is very important.
The tool should be capable of recognizing several separate response messages
sent from the server to the client over a period of time in an already established
connection.
Also, it should be capable of establishing a secondary connection along with the
main connection because push technologies like streaming tend to block the
primary connection. This secondary connection should be automatically
terminated when the main connection ends.
The capability of the tool to generate modified virtual users for scenarios in which
push technology like streaming comes into play is an added advantage.
Furthermore, multi-monitor support by the tool is very useful to spot application
flaws. Identification of the key monitors is elucidated in the subsequent section.
Flex applications - Key Monitors
In general, Performance testing ends with an analysis of the captured results, which
helps in identifying the bottlenecks and gives a clear picture to fine-tune the application.
There are a wide range of monitors to examine the overall status of execution and it
helps to spot the erroneous behaviour of an application. When monitors are defined and
used, it gives out valuable information regarding the tests carried out which can be used
by developers for improving the quality of the application. Given below are the different
types of monitors that can be defined and used for scrutinizing the performance of Flex
based applications.
1. Windows monitors.
2. Database monitors.
3. Network monitors.
4. App Server monitors.
Considerations while working with Flex
Moving forward with Flex based applications, given below are some considerations that
help in achieving desired results.
Team should be given good training with respect to both Technology and
Tools.
Proper Planning of testing activities and setting Key Performance Indicators.
Dedicated Framework in place to handle the Flex based testing.
Building the right Test Environment is one of the key factors that aids in
getting expected results.
Right Tool identification with Flex framework.
After working with different versions of Flex applications, we have come up with some
suggestions for tools.
8. 8
Proprietary Tools such as HP LoadRunner, Neoload, WebLOAD and Silk
Performer offer extensive support for performance testing Flex.
Open source tools like Jmeter, SOAPUI supports recording Flex based
applications with some limitations. AMF sampler plug-in in Jmeter is expected
to be released soon to give full fledged support to Flex 4.
Fig. 4 Flex performance testing tools – Licensed vs. Open source.
Limitations of Tools:
As Flex is a new emerging technology, the license cost of the tools is fairly
high to implement.
Since Flex 4 was released in early 2010, existing tool vendors are working on
enhancements to keep up with such technological advances.
Concluding thoughts
Next generation RIA technologies like Flex guarantee improved customer contentment
and also pose scores of challenges at the same time for successful deployment due to
the complexity in operation. They have the potential to engulf the servers and networks
that deliver the content to client systems. Therefore, a well structured and systematic
approach should be defined with the right tool in place in order to overcome the
performance challenges and to achieve positive results with Flex projects. Hopefully
throughout this article, you have gained an increased understanding of what Flex is and
why performance testing of Flex based applications is the need of the hour. The principal
objective of this Whitepaper was to address the issues and key considerations
concerning performance testing of Flex based applications. Furthermore, it also gives a
route map for tool selection and this paper can be used as a reference for selecting a
suitable tool.
References
http://www.adobe.com/products/flex/
http://flex.org/showcase
http://en.wikipedia.org/wiki/Adobe_Flex
9. 9
Appendix
AMF - Action Message Format
RPC - Remote procedure call
RIA – Rich Internet Application
HTML – Hyper Text Mark-up Language
HTTP – Hyper Text Transfer Protocol
.SWF – It is an abbreviation for Shockwave Flash and the extension for flash files.
Binary Format – It is a format for representing data used by applications and is used for
executable programs and numeric data.
ActionScript – ActionScript is Adobe Flash's own embedded scripting language. It has a
JavaScript like structure and has developed into a flexible and powerful platform for
Flash games and interactive multimedia.