Upload
devendra-singh
View
320
Download
1
Embed Size (px)
Citation preview
Hier soll der Titel reinNon-Functional Testing
www.qs-tag.de
Veranstalter: imbus AG www.qs-tag.de
Mobile Native Apps Performance
Testing Using Open Source Tool
JMeter
Devendra SinghNihilent Technologies Ltd.
© Nihilent Technologies 2015
Agenda
• Testing Landscape• Mobile Apps
• Purpose• Importance• Types
• Performance Problems in Mobile Applications• Challenges in Mobile Performance Testing• Using JMeter for Mobile Performance Testing• Practical Session
• Configuration Settings• Setting up Proxy Server• Setting the Device
• Scripting• iOS App• Android App
• Running Performance Test• Analysing Performance Bottlenecks
• Questions and Answers
© Nihilent Technologies 2015
Testing Landscape
FunctionalTesting
UsabilityTesting
CompatibilityTesting
Integration & System
Testing
PerformanceTesting
RegressionTesting
Test Strategic
Consulting
Test Process
Consulting
Testing Verification
and Validation
Conventional
Testing
Non Functional
Testing
Automation
Testing
Testing Services Mobile Testing Types
© Nihilent Technologies 2015
Mobile Apps - Purpose
Program designed to run on Mobile devices.
Purpose
• Information Retrieval• Business• Communication• Education• Finance• Social Networking• Mobile Commerce• Health and Fitness• Travel and Transport
and many more…
© Nihilent Technologies 2015
Importance - Current Trends
Mobile is dominant in major areas
Mind your business; through mobile
Ref: Smartinsights.com
© Nihilent Technologies 2015
Importance - User Behavior
Analyst firm BIA/Kelsey has projected
• By 2015 there will be more local searches coming from smartphones than PCs in the US.
• Smartphone search volumes are growing faster than search on the PC.
© Nihilent Technologies 2015
Mobile Apps - Types
There are majorly three types of Applications:
Native
Hybrid
Web• Stored on a remote server • Delivered over the internet through
a browser • Websites that look and feel like
native applications.
© Nihilent Technologies 2015
Mobile Apps - Types
There are majorly three types of Applications:
Native
Hybrid
Web• Developed for use on a particular
platform or device• Specific programming language,
such as Objective C (for iOS) and Java (for Android)
• Provides fast performance and a high degree of reliability
© Nihilent Technologies 2015
Mobile Apps - Types
There are majorly three types of Applications:
Native
Hybrid
Web
• Hybrid Apps are like native apps, run on the device, and are written with web technologies (HTML5, CSS and JavaScript)
• Leverages device’s browser engine but not browser
• A web-to-native abstraction layer • Access to device capabilities that are
not accessible in Mobile Web applications, such as the accelerometer, camera and local storage
© Nihilent Technologies 2015
Performance Problems in Mobile Application
Application performance can be hindered by below problems:
ApplicationCode
DatabasePerformance
ConfigurationSettings
Architecture
LoadBalancing
Connectivity
Third PartyServices
• Sluggish Code• Synchronization Issues • Memory Leaks• Application Deadlocks
© Nihilent Technologies 2015
Performance Problems in Mobile Application
Application performance can be hindered by below problems:
ApplicationCode
DatabasePerformance
ConfigurationSettings
Architecture
LoadBalancing
Connectivity
Third PartyServices
• Deadlocks• Inefficient Queries• Missing Index• Memory and Connection
Management• Unmanaged Data Growth
© Nihilent Technologies 2015
Performance Problems in Mobile Application
Application performance can be hindered by below problems:
ApplicationCode
DatabasePerformance
ConfigurationSettings
Architecture
LoadBalancing
Connectivity
Third PartyServices
• Using Default Setups for Server boxes
• Lack of technology specific best practices
© Nihilent Technologies 2015
Performance Problems in Mobile Application
Application performance can be hindered by below problems:
ApplicationCode
DatabasePerformance
ConfigurationSettings
Architecture
LoadBalancing
Connectivity
Third PartyServices
• Unbalanced Tiers• Mismatched Technology• Lack of Scalability• Poor Design
© Nihilent Technologies 2015
Performance Problems in Mobile Application
Application performance can be hindered by below problems:
ApplicationCode
DatabasePerformance
ConfigurationSettings
Architecture
LoadBalancing
Connectivity
Third PartyServices
• Lack of Visibility• Under utilized resources• Lack of Health checking• Poor load Distribution
© Nihilent Technologies 2015
Performance Problems in Mobile Application
Application performance can be hindered by below problems:
ApplicationCode
DatabasePerformance
ConfigurationSettings
Architecture
LoadBalancing
Connectivity
Third PartyServices
• DNS Routing• Number of hops• Inefficient Firewall
Configurations
© Nihilent Technologies 2015
Performance Problems in Mobile Application
Application performance can be hindered by below problems:
ApplicationCode
DatabasePerformance
ConfigurationSettings
Architecture
LoadBalancing
Connectivity
Third PartyServices
• Aggregated Content• Payment Gateways• Social Network integration
© Nihilent Technologies 2015
Approaches and Challenges in Mobile Performance Testing
Approach 1 : Using Real Devices to Generate LoadChallenges:• Testing Cost will increase drastically• Manage device collection is hectic• Poor Network Quality, High Latency
Approach 2 : Using Licensed ToolsChallenges:• Tools use emulators to generate script• Tools supports only browser based recording• Restriction on number of users• License Cost
Approach 3 : Using Network Proxy Capturing UtilitiesChallenges:• Requires lot of effort in filtering out the requests and responses from Application under
test• Script generation and enhancement is complex• Script recorded not close to real world• Supports Licensed tools
© Nihilent Technologies 2015
Using JMeter for Mobile Performance Testing
FactAll the performance testing tools work on one abstract idea.“Capture the HTTP traffic coming and going from mobile device.”
We have to simulate the same using JMeter but alas no sampler request for mobile protocols so this cannot be captured in the conventional way.
ConceptNative and hybrid mobile application uses the HTTP protocol to communicate with the server and this can be utilized.
Approach• Make the machine with JMeter a proxy server• Connect mobile device with this proxy server• Capture the HTTP traffic (request – response from mobile device) using proxy
server as all the traffic from device is now routed to this proxy server
This approach is far closer to the real world traffic simulation as compare to that of emulators.
© Nihilent Technologies 2015
Using JMeter for Mobile Performance Testing
Exchange of Request Response between Mobile device with Application Server
© Nihilent Technologies 2015
Using JMeter for Mobile Performance Testing
Exchange of Request Response between Mobile device with Application Server via Proxy Server
© Nihilent Technologies 2015
Performance Testing Value Add
Below are the value adds for performance testing.
• Established benchmark behaviour of the Application
• Improved quality from a user’s perspective
• Reduced system costs
• Increased profits
• Identification of major application defects and architectural issues
• Guaranteed customer satisfaction
• Clarity on resource utilization
• Reliability and Availability
• Optimised Software code
© Nihilent Technologies 2015
Practical Session
• Configuration Settings
• Setting up Proxy Server• Test Host Machine• JMeter
• Setting the device• Android• iOS
• Scripting
• Android• iOS
• Running Performance Test
• Analysis for Bottlenecks
© Nihilent Technologies 2015
Benefits, Assumptions and Dependencies
Benefits• Device independent • Cost Effective • Application platform independent • Applicable to other projects situation without any limitations • Scripts generated is much closer to real world as compared to that of using simulators • No network latency or overhead is induced by using network traffic capture tools
Assumptions• The native application is interaction with the server via HTTP protocol.• Device with the application installed is available.• The user’s actions that do not have ant HTTP request sent and received will not be
captured and as these are executed at the client level are not of as much importance to the performance testing.
Dependencies• The device and machine with tools installed should be in same network.• We have sufficient privileges to make the machine with tool installed a proxy server.
© Nihilent Technologies 201524
Questions?
© Nihilent Technologies 201525
Thank You