mobile performance testing

31
Mobile Performance Tes1ng @RupeshDubey @PriyankDhillon

Upload: thoughtworks

Post on 22-Nov-2014

256 views

Category:

Technology


0 download

DESCRIPTION

The why, what and how of Mobile Testing, including best practices, tools recommendations and tips.

TRANSCRIPT

Page 1: Mobile Performance Testing

Mobile  Performance  Tes1ng  

                                                     @RupeshDubey                                                          @PriyankDhillon  

Page 2: Mobile Performance Testing

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: Mobile Performance Testing

Why  mobile  perf  is  important?  

Source:Blaze    

Page 4: Mobile Performance Testing

Mobile  Users  Expect  equal  speeds  

Source:Blaze  

Page 5: Mobile Performance Testing

Users  abandon  slow  apps  

Page 6: Mobile Performance Testing

Mobile  Apps  

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

•  Na1ve  Apps    •  Hybrid  Apps  

Page 7: Mobile Performance Testing

mDOT  Sites  

Source:Velocity  

Page 8: Mobile Performance Testing

Responsive  Web  Apps  

Source:BostonGlobe  

Page 9: Mobile Performance Testing

Mobile  Apps  

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

•  Na1ve  Apps    •  Hybrid  Apps  

Page 10: Mobile Performance Testing

Performance  Challenges    

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

•  Na1ve  Apps    •  Hybrid  Apps  

Page 11: Mobile Performance Testing

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

Page 12: Mobile Performance Testing

Perf  Challenges  while  browsing  on  mobile  

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

Page 13: Mobile Performance Testing

Radio  Resource  Controlling  and  RTT  

Page 14: Mobile Performance Testing

JS  Execu1on  Time  

Page 15: Mobile Performance Testing

Browser  Cache  

Desktop  browser  Cache:  512  MB  

Page 16: Mobile Performance Testing

Browser  Cache  

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

Page 17: Mobile Performance Testing

HTTP  pipelining  

Page 18: Mobile Performance Testing

How  to  Monitor    

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

Page 19: Mobile Performance Testing

Demo  

Page 20: Mobile Performance Testing

Responsive  Web  Design  

Page 21: Mobile Performance Testing

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: Mobile Performance Testing

Mobile  Apps  

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

•  Na9ve  Apps    •  Hybrid  Apps  

Page 23: Mobile Performance Testing

Challenges  

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

Page 24: Mobile Performance Testing

Memory  Leaks  

Page 25: Mobile Performance Testing

ARC  

Page 26: Mobile Performance Testing

Power  Consump1on  

Page 27: Mobile Performance Testing

Power  Consump1on(Contd)  

Page 28: Mobile Performance Testing

Network/Bandwidth  

Page 29: Mobile Performance Testing

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: Mobile Performance Testing

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: Mobile Performance Testing

Ques1ons?