1 / 52

Introduction to Mobile Performance Testing

Dive deep into the world of mobile app performance testing to uncover possible points of risk and optimize network, backend, and device interactions for better user experience and brand reputation. Learn from HP LoadRunner components and workflow to elevate your mobile testing game.

mtownsend
Download Presentation

Introduction to Mobile Performance Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Mobile Performance Testing Wilson Mar, Angel Tran, Shlomi SalmaHOL330 in Sands 305, June 13, 2013

  2. Why performance test mobile apps? Mobile apps arenow: • how customers locate stores and information • how brands get exposure many times a day • the “face” of the organization

  3. Slow app = Slow product?

  4. Baseline vs. impact of network latency, etc. from HP Network Virtualization by Shunra [P01]

  5. Possible points of risk in landscape mDev: Network: Network: Network: Dev: SysAdmin: Back-end: DBA: Load Bal. Algorithm Latency& Loss ResourceUsage Server Config. Pooling &Threading DB Indexes & Logs DataCaching Encrypt, Compress. 3rd Party Cloud Services Platforms& Versions 2G,3G,4GCellular FirewallsVPNs WebServers AppServers DB Servers Storage LoadBalancers Device Features ISPs ScreenSizes Carriers InternetBrowsers Mobile Components LANs Web Services CDNs & CoLo.

  6. HP LoadRunner components and workflow Application Server(s) Database End User Client(s) Internet/WAN 5 Virtualize Network 1 Author Scripts 7 4 6 Measure Impact Virtualize Services Generate Load 8 Analyze, Compare, Report HP Live Network Test Scenario 2 Collaborate Plan and Execute Tests 3

  7. Scan for more information ServiceVirtualization MobileTesting http://www.hp.com/go/... LoadRunner NetworkVirtualization HP Codescan app

  8. Mobile technology terms Android WindowsPC “featurephones” iPhone, iPad Play. google.com Apple App Store Hybridapp internetexplorer minimalbrowser Chromebrowser Safari browser URL URL URL Native app ft.com HTML4 m.ft.com mobile site ft.com HTML5 responsive design ft.com/ws web services

  9. Mobile LoadRunner Scripting Demos https://connections.houston.hp.com/docs/DOC-15086

  10. Android Screen Monitor http://code.google.com/p/android-screen-monitor/ • Download to folder …\sdk\platform-tools\ASM.jar • Within Windows Explorer, double click on ASM.jar

  11. Create a New Script, Mobile Category HP LoadRunner VuGen 11.5 SP1+

  12. Multiple Approaches Available • Browser or hybrid app: • Ajax? > TruClient Ajax Mobile scripting protocol using User Agent spoofing in Firefox • Simple > Mobile HTTP/HTML scripting protocol • Native app: > Mobile HTTP/HTML scripting protocol • Android: • No device > Record Emulator using Android Virtual Device (AVD) • Have rooted device > Mobile Recorder generate lrpcap to Analyze • iOS & others: • > LoadRunner Proxy on same subnet/Wi-Fi hub (the newest technique) • > Record & AnalyzeWinPcap capture on the mobile app server

  13. Recording Method TruClient Ajax App web server User Agent in Firefox > TruClient Ajax HP LoadRunner VuGen 11.51+

  14. TruClient recording HP LoadRunner VuGen 11.51+

  15. Devices with User Agent strings Count: 27 HP LoadRunner VuGen11.52

  16. User Agent string example Sample User Agent for Samsung Galaxy S3 Mozilla/5.0 (Linux; U; Android 4.0; xx-xx; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 More at http://www.useragentstring.com/ HP LoadRunner VuGen11.52

  17. Android Versions 4.1 (16) 4.2 (17) 4.0 (15) 2.3 (9,10)

  18. Mobile Device Manager Tool in VuGen

  19. VuGen Scripting Process • Configure recording settings • Consider run-time settings • Object identification using script levels • Specify Transaction Names • Specify Completion End Events Logic • Insert flow control • Run-time logic • Vary data based on parameters • Using C script functions in a library from HP Virtual User Generator User Guide 11.52 page 73

  20. Random Think-time in TruClient Arguments: Math.floor( 11 * Math.random()+5 ); http://www.perftesting.co.uk/ajax-truclient-tips-and-tricks-part-ii/2012/05/02/

  21. TruClient Toolbox drag and drop Arguments: var randWait = Math.floor( 11 * Math.random()+5 ); window.alert( “randWait=” + randWait ); http://www.perftesting.co.uk/ajax-truclient-tips-and-tricks-part-ii/2012/05/02/

  22. HTTP/HTML Mobile Recording https://connections.houston.hp.com/docs/DOC-15086

  23. Mobile HTTP vs. HTML mode=“HTTP” mode=“HTML” For use with web services calls. Does not parse for resource requests. Parse HTML to automatically identify additional resources to download • CSS • JavaScript HP LoadRunner VuGen

  24. Record Mobile HTTP/HTML HP LoadRunner VuGen11.52

  25. HTTP/HTML Recording Methods Wizard HTTP/HTML Record & Analyze Traffic Analyze Traffic Record Emulator Proxy Recording TruClient HP LoadRunner VuGen11.52

  26. Proxy Recording https://connections.houston.hp.com/docs/DOC-15086

  27. HTTP/HTML Recording Methods Wizard HTTP/HTML Proxy Recording TruClient HP LoadRunner VuGen11.52

  28. Proxy Recording HTTP/HTML Android APK iOS App web server IPA VuGen Proxy IP:Port 8080 LoadRunner Proxy Proxy Recording Port 80/443 HP LoadRunner VuGen11.5x

  29. Proxy Recording HTTP/HTML Proxy Recording HP LoadRunner VuGen11.52

  30. Proxy Recording Setup on iOS 1. 2. 3. Scroll down 4. 255.255.255.0 192.168.1.2 Eleanor 192.168.1.1 Eleanor 192.168.1.3 8080 Password: ncjm-q3ey-t1dd Source: http://www.amsys.co.uk/2012/blog/how-to-setup-proxy-servers-in-ios/

  31. Proxy Recording Setup on Android Galaxy S3 (4.1.2) 1. 2. Long press 3. 4. Eleanor ncjm-q3ey-t1dd

  32. Record Emulator https://connections.houston.hp.com/docs/DOC-15086

  33. HTTP/HTML Recording Methods Wizard HTTP/HTML Record Emulator HP LoadRunner VuGen11.52

  34. Record Emulator Android Recording Method HTTP/HTML Android Play.Google .com Install APK Backup File manager Copy Android… \sdk\tools APK Record Emulator deviceemulator Async. @device ADT file App web server HP LoadRunner VuGen11.5x

  35. Record Emulator Requirements HTTP/HTML USB cable to device USB driver for device Android app APK file for Android app under test Android file download manager app to extract APK file from device JDK (Java Development Kit) ADT (Android Development Toolkit) plug-in for Eclipse AVD (Android Virtual Device) within Eclipse for device under test JAVA_HOME and PATH Windows environment variables HP LoadRunner 11.50 and SP2 patch to upgrade to 11.52 Record Emulator

  36. Emulator

  37. Record & Analyze Traffic https://connections.houston.hp.com/docs/DOC-15086

  38. HTTP/HTML Recording Methods Wizard HTTP/HTML Record & Analyze Traffic HP LoadRunner VuGen11.52

  39. Record & Analyze Traffic HTTP/HTML Android .cap, .pcap Record & Analyze Traffic networksniffer APK Ad hoc network iOS App web server IPA HP LoadRunner VuGen11.5x

  40. Analyze Traffic https://connections.houston.hp.com/docs/DOC-15086

  41. HTTP/HTML Recording Methods Wizard HTTP/HTML Analyze Traffic HP LoadRunner VuGen11.52

  42. Analyze Traffic HTTP/HTML Android 4.1+(rooted) Android Mobile Recorder APK Analyze Traffic .lrpcap App web server HP LoadRunner VuGen11.52

  43. Android Mobile Recorder 1. Start Recording 2. Perform user steps. 3. Stop and send email

  44. Android Mobile Recorder Settings

  45. Recording Methods Recap HTTP/HTML Android 4.1+(rooted) Android Record & Analyze Traffic Play.Google .com .cap, .pcap networksniffer Mobile Recorder APK Analyze Traffic .lrpcap Ad hoc network APK Record Emulator deviceemulator @device ADT file iOS App web server IPA VuGenProxy IP:Port 8080 Proxy Recording LoadRunner Proxy Port 80/443 User Agent in Firefox > TruClient Ajax HP LoadRunner VuGen11.52

  46. Mobile scenarios https://connections.houston.hp.com/docs/DOC-15086

  47. How can we help? Development Execute automated build Analytics Agile Manager (Jenkins) Executive Scorecard App. Lifecycle Intelligence Security Code Scan Fortify Source Code Analysis Test results Performance Center ALM Analysis Tear down environment Provision & deploy environment Continuous Delivery Automation (CDA) Continuous Delivery Automation (CDA) Application Security Assessment WebInspect Monitoring & Diagnostics Run test cases Business Service Management Service Virtualization UFT / BPTLoadRunner ALM Lab Management Network Virtualization HP integrated testing suite

  48. Interconnected component services Shopping process • Buy • Ship • Track • Search • Pay Product Customer profiles Payment Shipping Traditional Composite Track package Managed cloud Public cloud Privatecloud

  49. Concurrency and rendezvous Illustrative data [P10]

  50. Key take-aways • For mobile browser apps (jQuery Mobile, Sencha, PhoneGap, etc.), little scripting is needed using User Agent spoofing via Firefox TruClient Mobile • JavaScript executes against a DOM for each virtual user • Traffic captured between native apps and server are converted to VuGen scripts • Android native app traffic on rooted devices can be recorded on device using LoadRunner Mobile Recorder • iPhone and iPad (iOS) -- all non-rooted apps – can be recorded using LoadRunner Proxy • Monitor and Diagnose using HP Business Service Management • Consider HP Network Virtualization and Services Virtualization

More Related