Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Best Practices in Mobile CI (webinar)

11,036 views

Published on

Developers have embraced Continuous Integration for years and it has proven their value for accelerating software production for Web environments. However, for mobile developers, it’s been a slow road to adopting many of these same practices. In this webinar, Kevin Rohling (Emberlight, Ship.io) and Kristian Meier (Sauce Labs) will cover best practices in implementing a mobile CI system and demonstrate how you can easily build, test and deploy mobile apps.

Published in: Mobile
  • Hey guys! Who wants to chat with me? More photos with me here 👉 http://www.bit.ly/katekoxx
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Best Practices in Mobile CI (webinar)

  1. 1. Best Practices for Mobile CI April 28, 2015
  2. 2. © Sauce Labs, Inc. Presenters Kevin Rohling Co-founder / VP of Product at Emberlight Founder/CEO of cisimple now Ship.io kevin@kevinrohling.com Kristian Meier Sales Engineer at Sauce Labs
  3. 3. WHAT IS CONTINUOUS INTEGRATION FOR MOBILE? AUTOMATICALLY… Build Test Deploy EVERY COMMIT.
  4. 4. CONTINUOUS INTEGRATION HOW DOES IT WORK 1. Developer commits code
  5. 5. CONTINUOUS INTEGRATION HOW DOES IT WORK 2. CI Server picks up the change.
  6. 6. CONTINUOUS INTEGRATION HOW DOES IT WORK 3. Code is automatically compiled
  7. 7. CONTINUOUS INTEGRATION HOW DOES IT WORK 4. Tests are run
  8. 8. CONTINUOUS INTEGRATION HOW DOES IT WORK 5. Application is deployed
  9. 9. CONTINUOUS INTEGRATION WHY? • Reduce the need for human-based testing • Faster Feedback • Automate EVERYTHING
  10. 10. WHY DO I USE CI? • No Touch Configuration
  11. 11. WHY DO I USE CI? • No Touch Configuration • Automated OTA Distribution
  12. 12. WHY DO I USE CI? • No Touch Configuration • Automated OTA Distribution • Code Validation: Automated Builds and Tests
  13. 13. ONE SIZE DOES NOT FIT ALL Business Drivers Engineering Challenges Early Startup Initial Traction, Funding Stability, UX Consulting Firm Client Status Updates, Deadlines Ad Hoc Distribution, Unit Testing Large Product Team Retention, Growth, Revenue Automation, Communication PROCESS
  14. 14. MOBILE IS HARDER • Infrastructure
  15. 15. MOBILE IS HARDER • Infrastructure • Compilation/Code Signing
  16. 16. MOBILE IS HARDER • Infrastructure • Compilation/Code Signing • Testing
  17. 17. MOBILE IS HARDER • Infrastructure • Compilation/Code Signing • Testing • Deployment
  18. 18. SIMULATORS/EMULATORS vs DEVICES SIMULATORS: • Used by iOS, included w/ Xcode • Execute i386 instruction set, not ARM • Very fast compared to Emulators • Do not have access to certain hardware functions • (GPS, Bluetooth Radio, Accelerometers, etc)
  19. 19. SIMULATORS/EMULATORS vs DEVICES EMULATORS: • Used by Android, included w/ Android SDKs • Execute ARM (or native device instruction set) • Very slow compared to Simulators • Do not have access to certain hardware functions • (GPS, Bluetooth Radio, Accelerometers, etc)
  20. 20. SIMULATORS/EMULATORS vs DEVICES DEVICES: • Reproduces the actual performance experienced by your users • The only way to catch manufacturer/OEM bugs • Very expensive to configure and maintain compared • Full access to hardware functions: • (GPS, Bluetooth Radio, Accelerometers, etc)
  21. 21. WHEN TO USE DEVICES vs SIMULATORS/EMULATORS? • Simulators and Emulators are an excellent solution for running automated tests during development. They are inexpensive and will reliably catch most problems. • Physical Devices can be used on a lower frequency (i.e. pre-release, weekly, daily, etc.). They are the only way to catch performance problems, test certain hardware features and find OEM issues. In the least, devices should be used before every release.
  22. 22. UNIT TESTING According to a recent survey: -77% of developers said app quality is “very important or mission critical” -80% of mobile developers test their apps manually -Only 13% of mobile developers use automated testing
  23. 23. UNIT vs FUNCTIONAL TESTING • Unit Testing - testing small pieces of code • Functional Testing - testing button clicks and UI interaction
  24. 24. UNIT/FUNCTIONAL TESTING BENEFITS: • Instant Gratification (GREEN is good!) • Repeatable • Can automatically test every commit
  25. 25. UNIT/FUNCTIONAL TESTING CHALLENGES: • Unit Tests are not users • LOTs of work to write and maintain them • Which framework to use?
  26. 26. • What language/framework do your developers know? • Open Source/Community Support • 3rd Party Framework requirements UNIT/FUNCTIONAL TESTING FRAMEWORKS WHICH ONE TO USE?
  27. 27. CI TOOLS/SERVICES FOR MOBILE Good: Open Source, Lots of plugins Bad: Self-Hosted, DIY solution Jenkins
  28. 28. CI TOOLS/SERVICES FOR MOBILE Good: Hosted solution, OS X support, Lots of plugins Bad: Tedious setup process Travis CI
  29. 29. CI TOOLS/SERVICES FOR MOBILE Good: Hosted solution, Designed specifically for mobile, Easy setup Bad: Less flexible than other solutions Ship.io
  30. 30. CI TOOLS/SERVICES FOR MOBILE Good: Integrated w/ Xcode, Apple-Supported Bad: Self-Hosted, iOS Only Xcode CI
  31. 31. Using the Sauce Labs Cloud with CI
  32. 32. Sauce is the ideal Automated Testing Platform for CI
  33. 33. © Sauce Labs, Inc. Appium • “Selenium for mobile apps” - uses the WebDriver spec to simulate user actions on iOS and Android • Leverage your existing Selenium test architecture to help speed apps to market • Maximize test code reuse across platforms makes developers more productive • Development led by Sauce Labs Appium is an open source framework that automates testing of native, hybrid and mobile web apps.
  34. 34. © Sauce Labs, Inc. The Sauce Labs Platform • Point your existing test scripts to Sauce Labs • We spin up a new, pristine VM every time • Run tests in parallel to reduce test time • Capture videos, logs and test metadata • Choose from over 500 browsers / OS combinations
  35. 35. Demo
  36. 36. © Sauce Labs, Inc. Learn more about Sauce Labs • Sign up for a free trial of Sauce Labshttps://saucelabs.com/signup/trial • Watch a video https://www.youtube.com/user/saucelabs

×