31
Mobile Performance Tes1ng @RupeshDubey @PriyankDhillon

Performance testing of mobile apps

  • Upload
    vodqa

  • View
    3.725

  • Download
    3

Embed Size (px)

DESCRIPTION

This talk was presented at VodQA Gurgaon 3rd edition (11 July 2013) Talk Abstract: In midst of testing functional aspect of your mobile apps, performance testing is often ignored or takes a back seat. With the strict quality checks on app stores and other platforms, it becomes all the more essentials for your app to meet performance criteria. We would be focusing on understanding these criteria in detail, their impact and ways to tackle them. Speakers: Rupesh Dubey: Rupesh has 5+ years of experience in Test Automation and Manual testing and have been with ThoughtWorks for more than 3 years. He has worked in various domains including HealthCare and Business Consulting. Priyank Dhillon: He has around 8 years of experience as QA. He has worked on domains such as Telecom, Video and E-commerce and has been involved in different aspects of testing such as Security, White box, Performance. He has worked in software automation testing using wide range of automation tools, doing manual testing and in requirement analysis.

Citation preview

Page 1: Performance testing of mobile apps

Mobile  Performance  Tes1ng  

                                                     @RupeshDubey                                                          @PriyankDhillon  

Page 2: Performance testing of mobile apps

What  to  expect?  

•  Why  mobile  performance  is  important?  •  Different  types  of  mobile  apps.  •  Performance  Challenges  •  Tools  and  Technique  •  Web  apps  Profiling  (Latency,page  audits)    •  Na1ve  apps  Profiling  (Memory  leaks)  •  Recommenda1ons  

Page 3: Performance testing of mobile apps

Why  mobile  perf  is  important?  

Source:Blaze    

Page 4: Performance testing of mobile apps

Mobile  Users  Expect  equal  speeds  

Source:Blaze  

Page 5: Performance testing of mobile apps

Users  abandon  slow  apps  

Page 6: Performance testing of mobile apps

Mobile  Apps  

•  Mobile  Browser  apps  – mDOT-­‐  dedicated  mobile  sites  –  Responsive  web  design    

•  Na1ve  Apps    •  Hybrid  Apps  

Page 7: Performance testing of mobile apps

mDOT  Sites  

Source:Velocity  

Page 8: Performance testing of mobile apps

Responsive  Web  Apps  

Source:BostonGlobe  

Page 9: Performance testing of mobile apps

Mobile  Apps  

•  Mobile  Browser  apps  – Dedicated  mobile  sites  -­‐  mDOT  –  Responsive  web  design    

•  Na1ve  Apps    •  Hybrid  Apps  

Page 10: Performance testing of mobile apps

Performance  Challenges    

•  Mobile  Browser  apps  – mDOT-­‐  dedicated  mobile  sites  –  Responsive  web  design    

•  Na1ve  Apps    •  Hybrid  Apps  

Page 11: Performance testing of mobile apps

Front-­‐End  Vs  Back-­‐End  performance  

Page 12: Performance testing of mobile apps

Perf  Challenges  while  browsing  on  mobile  

•  Radio  Resource  Control  •  HTTP  pipelining  •  Browser  Cache  •  JS  execu1on  1me    

Page 13: Performance testing of mobile apps

Radio  Resource  Controlling  and  RTT  

Page 14: Performance testing of mobile apps

JS  Execu1on  Time  

Page 15: Performance testing of mobile apps

Browser  Cache  

Desktop  browser  Cache:  512  MB  

Page 16: Performance testing of mobile apps

Browser  Cache  

•  sqlite3  webviewCache.db  'select  expires  from  cache  order  by  expires  desc;'  

Page 17: Performance testing of mobile apps

HTTP  pipelining  

Page 18: Performance testing of mobile apps

How  to  Monitor    

•  MobiTest  /  Web  page  test  •  ADB  (  Android  debug  bridge)  •  Remote  debugging  for  mobile  safari  •  Yslow  •  SpriteMe  •  Icy  (iOS  specific)  

Page 19: Performance testing of mobile apps

Demo  

Page 20: Performance testing of mobile apps

Responsive  Web  Design  

Page 21: Performance testing of mobile apps

Takeaways  for  Mobile  apps  

•  Minify  your  java  script  and  CSS  •  All  images  have  dimensions  specified  •  Have  an  efficient  caching  strategy  •  Load  JavaScript  at  the  end  of  the  page  •  Lazy  loading    •  Different  sizes  of  image  for  Responsive  web  apps  •  Don’t  download  extra  CSS    •  Serve  low  resolu1on  images  on  smaller  screen  

Page 22: Performance testing of mobile apps

Mobile  Apps  

•  Mobile  Browser  apps  – mDOT-­‐  dedicated  mobile  sites  –  Responsive  web  design    

•  Na9ve  Apps    •  Hybrid  Apps  

Page 23: Performance testing of mobile apps

Challenges  

•  Memory  leaks  •  CPU  limit    •  Network/Bandwidth  •  Power  consump1ons    

Page 24: Performance testing of mobile apps

Memory  Leaks  

Page 25: Performance testing of mobile apps

ARC  

Page 26: Performance testing of mobile apps

Power  Consump1on  

Page 27: Performance testing of mobile apps

Power  Consump1on(Contd)  

Page 28: Performance testing of mobile apps

Network/Bandwidth  

Page 29: Performance testing of mobile apps

Takeaways  for  na1ve  apps  •  Release  or  free  any  allocated  memory  as  soon  as  you  are  done  using  it.  

•  Avoid  compu1ng  anything  un1l  you  are  sure  you  actually  need  it.  

•  Avoid  spinlocks,  polling,  and  other  CPU-­‐hogging  techniques.  

•  When  prac1cal,  perform  network  requests  in  batches  rather  than  one  at  a  1me.  

•  Consider  memory-­‐mapping  large  files  instead  of  reading  them  into  RAM.  Doing  so  helps  the  system  manage  memory  more  efficiently.  

Page 30: Performance testing of mobile apps

Few  Pointers  for  iOS  App  submission  

iOS  Guidelines:  •  App  size  should  not  be  more  than  50  MB  for  non-­‐gaming  app.  

•  Any  memory  leak  and  your  app  is  rejected  •  Device  bagery  constraints  •  Excessive  hea1ng    

Page 31: Performance testing of mobile apps

Ques1ons?