Load Testing RIA using WebLOAD
Amir Shoval, VP Product Management [email protected]
Agenda
• Introduction to performance testing
• Introduction to WebLOAD
• Load testing Rich Internet Applications
Software Performance
•
The speed
at which software functions
(sub-second response time versus three-(sub-second
response time)
•
How often software is available
(99% uptime
versus scheduled weekly downtime)
•
How these two factors change as usage
levels
increase (from dozens of current users to
thousands)
Software performance matters to the business
•
Software performance is a limiting factor of
business performance
–
A financial services company
can’t provide
a
life insurance quote to a customer
any faster
than its quote engine can compute the
appropriate rate
–
An automotive supplier
can’t start
building
parts if the software that delivers orders from
its OEM customers has been taken down by
unanticipated usage levels
–
A retailer
can’t process
orders
any faster
than
it can process credit card validations
Performance Testing
• Performance testing (performance verification) ensures that software performance meets the business needs.
• Most relevant for multi-user systems (such as web applications), focusing on testing the system’s back-end servers.
• Using tools to automate the testing process to verify the system’s speed, availability and tolerance for load.
• These tools enable simulating multiple users accessing the program's services concurrently and measure
their responsiveness.
• Often used synonymously with Load Testing.
Approached for load testing web applications
• Virtual Client Model
– Simulate real-user scenarios
– The application is statefull
– Verify the system is fast
enough in terms of response times and user experience
• Transaction Per Second (TPS) Model
– The system exposes a set of
services and/or needs to perform a set of transactions
– Services/transactions are stateless
– Can be consumed by several client applications
– Verify the services’ availability under load and their tolerance to increased levels of load
Challenges in load testing web applications
• Modern web applications are becoming more challenging to test – Web 2.0 • Rich Internet Applications (RIA) • AJAX • Push / streaming • Mashups – SOA • Web Services
– Desktop-deployed web applications (e.g. Adobe AIR)
• Testing method should match the service’s usage
– Remote procedure call (RPC, remoting)
– Messaging
– Representational State Transfer (REST)
How Does WebLOAD Work?
• WebLOAD tests Web applications by generating Virtual Clients that simulate real-world traffic.
• Virtual Clients emulate the actions of human users by performing typical actions (user transactions) on your Web application.
• By increasing the number of Virtual Clients, you increase the load on the system.
• The behavior of the Virtual Clients is defined by JavaScript-based scripts called Agendas.
• During load execution WebLOAD captures, measures, validates and analyzes the user transactions, for both content and time.
WebLOAD Architecture
Load Generator(s)
System Under Test Authoring
Environment
Execution Environment
Test Script Virtual Clients Performance Data Statistics and Performance Data WebLOAD Console WebLOAD IDE Analysis & Reporting WebLOAD Analytics Load Session Results WebLOAD Highlights Distributed architecture
Protocol level testing
Web standard JavaScript
Object oriented scripting
Server-side monitoring via
Test-script authoring
• Integrated environment for script creation and debugging
• Proxy-based recorder
– Record extended HTTP traffic on protocol level (AJAX, WebServices, binary data).
– Records both HTTP & HTTPS, with built-in automatic recording settings for IE 7.0 and Firefox 2.0.
• JavaScript test scripts
– Visual and manual editing
– HTML & XML DOM Access
– Step-by-step debugger with log, watch and variable views
• COM & JAVA Integration and Extendibility
– Integrate your existing component or extend the WebLOAD capabilities
Load session definition
• Define load session attributes
– Duration, Maximal load (up to
thousands of Virtual Clients per Load Machine)
– Complex scheduling models
– Multiple user-scenarios
– Load machines
– Server-side statistics to collect
– Content validation
• Goal-oriented definition
– Define performance goals according to SLA / requirements
– Increase load until defined goals are met
Load session execution
• On-line and real-time
monitoring of the load session
• Display collected statistics in both charts and tables
– Create charts to display any combination of measurement
• Increase/decrease the number of virtual clients
• Pause/stop the session at any time
• Error messages displayed in the Log view
Analysis & Reporting
• Current version –
WebLOAD Reporter
– Predefined reports
– Custom reports
– Publish to standard formats
List of Canned, Regression and Custom Reports
Session
Performance vs. Load Size Report
Measurements Description
• Next version –
WebLOAD Analytics
— More predefined reports
— Analyze using filters and parameters
— New stats: TPS, percentiles
— Regression reports
About RadView
16 Customer base Product Market knowhow • Company founded 1993• Pioneer of web apps testing
• Investment of 250 man years in development of web testing tools
• 1600 customers worldwide
• Founder - Ilan Kinreich, (co - founder of Mercury
Interactive)
• NASDAQ: IPO in 2000, raised $40M
Load testing Rich Internet Applications (RIA)
What is RIA?
Asynchronous JavaScript And XML - AJAX
• One of the key technologies behind Web 2.0
• Web development technique for creating interactive
web applications
• AJAX techniques
– DOM accessed by a client-side scripting language
– XMLHttpRequest object used to exchange data asynchronously with the web server.
– XML, plain text, JSON, preformatted HTML – as data types passed between the client and the server.
• AJAX is not a technology in itself, but a term that refers to the use of a group of technologies
AJAX Sample
© Yahoo! (http://developer.yahoo.com/yui/datatable/)
var myDataTable = new YAHOO.widget.DataTable("xml", myColumnSet, myDat aSource,{initialRequest:"query=pizza&zip=94089&results=10"});
var myDataTable = new YAHOO.widget.DataTable("xml", myColumnSet, myDat aSource,{initialRequest:"query=pizza&zip=94089&results=10"});
…
<Title>Pizza Depot</Title>
<Address>919 E Duane Ave</Address> <City>Sunnyvale</City> <State>CA</State> <Phone>(408) 245-7760</Phone> <Rating> <AverageRating>3.5</AverageRating> … … <Title>Pizza Depot</Title>
<Address>919 E Duane Ave</Address> <City>Sunnyvale</City> <State>CA</State> <Phone>(408) 245-7760</Phone> <Rating> <AverageRating>3.5</AverageRating> …
Load Testing Tool – Implementation Options
• Technology
– Protocol (“network”) level record and replay
– Based on “sniffer like” proxy recording
• Main PROs:
√ Clear separation between server side and client side √ Not affected by application
level changes and GUI
• Main CONs:
8 Client side operation 8 Binary payload
• Technology
– Protocol (“network”) level record and replay
– Based on “sniffer like” proxy recording
• Main PROs:
√ Clear separation between server side and client side
√ Not affected by application level changes and GUI
• Main CONs:
8 Client side operation 8 Binary payload
• Technology
– Events and API record and replay
– Based on “events hooks” for recording and emulation for playback
• Main PROs:
√ GUI and client side testing
• Main CONs:
8 Application dependent 8 Cross-browser
incompatibility 8 Less scalabale
8 Handle operations which are not “client side triggered”
• Technology
– Events and API record and replay
– Based on “events hooks” for recording and emulation for playback
• Main PROs:
√ GUI and client side testing
• Main CONs:
8 Application dependent 8 Cross-browser
incompatibility
8 Less scalabale
8 Handle operations which are
RIA as Synchronous/Asynchronous Ajax
application
•
Load testing on the
protocol level provides
built-in support for
RIA-Ajax testing.
•
WebLOAD does not differ
between standard HTTP methods and XMLHTTP requests.
Adobe Flex
What is Adobe Flex ?
• Adobe’s solution for RIA.
• Adobe Flex is a development environment that enables developers to build applications that are rich in terms of how data flows between tiers.
• AMF (Action Message Format)
• Transport Channel
– AMF Channel / Secure AMF Channel
– HTTP Channel (AMFX) / Secure HTTP Channel
– Streaming AMF Channel
– RTMP Channel
Adobe Flex
• Flash Remoting MX Gateway
• LiveCycle Data Services enhances the client-side Flex framework by providing
high-performance connectivity with existing server-side data and business logic.
• LiveCycle Data Services integrates with existing common
middleware
• Types of services provided in LiveCycle Data Services
– RPC
– Publish/Subscribe messaging
WebLOAD Adobe Flex Add-on
99 Supports Flex 2 and up; Adobe AIRSupports Flex 2 and up; Adobe AIR
9
9 Record AMF 0/3 protocol over HTTP/HTTPSRecord AMF 0/3 protocol over HTTP/HTTPS
9
9 Debug and parameterize the agendaDebug and parameterize the agenda
9
9 Verify the responseVerify the response
9
9 Monitor Flex statisticsMonitor Flex statistics
9
Recording a Flex application
Playing the Agenda
Collecting Adobe LCDS server-side statistics
Call to Action
•
Download WebLOAD evaluation version
www.radview.com