Load Testing RIA using WebLOAD Amir Shoval, VP Product Management amirs@radview.com
Agenda Introduction to performance testing Introduction to WebLOAD Load testing Rich Internet Applications 2
Introduction to performance testing 3
Software Performance The speed at which software functions (subsecond response time versus three-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) 4
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 5
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 backend 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. 6
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 7
Challenges in load testing web applications 8 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)
Introduction to WebLOAD 9
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. 10
WebLOAD Architecture Authoring Environment Test Script Load Generator(s) Virtual Clients WebLOAD IDE Execution Environment Statistics and Performance Data Performance Data System Under Test 11 WebLOAD Console Load Session Results Analysis & Reporting WebLOAD Analytics WebLOAD Highlights Distributed architecture Protocol level testing Web standard JavaScript Object oriented scripting Server-side monitoring via SNMP\ JMX\ PerfMon\ RSTATD
Test-script authoring 12 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 13 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 Report and/or stop the test
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 14
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 15 Next version WebLOAD Analytics More predefined reports Analyze using filters and parameters New stats: TPS, percentiles Regression reports Central session repository Design your own reports
About RadView 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 Customer base Product Market knowhow 16
Load testing Rich Internet Applications (RIA) Adobe Flex as a sample of RIA technology 17
What is RIA? RIA is not a technology by itself and there are several implementations for it: 18
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 19
AJAX Sample <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> var mydatatable = new YAHOO.widget.DataTable("xml", mycolumnset, mydat asource,{initialrequest:"query=pizza&zip=94089&results=10"}); 20 Yahoo! (http://developer.yahoo.com/yui/datatable/)
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: Client side operation 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: Application dependent Cross-browser incompatibility Less scalabale Handle operations which are not client side triggered 21
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. Agenda execution is synchronous. 22
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 WebLOAD supports the HTTP and AMF channels 23
Adobe Flex Flash Remoting MX Gateway LiveCycle Data Services enhances the client-side Flex framework by providing highperformance 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 Data Management 24
WebLOAD Adobe Flex Add-on Supports Flex 2 and up; Adobe AIR Record AMF 0/3 protocol over HTTP/HTTPS Debug and parameterize the agenda Verify the response Monitor Flex statistics Publish performance reports 25
Recording a Flex application 26
The Recorded Agenda 27
Playing the Agenda 28
AMF Response Verification 29
Collecting Adobe LCDS server-side statistics 30
Executing the Load Test 31
Call to Action Download WebLOAD evaluation version www.radview.com Provide us feedback amirs@radview.com VP product 32