managing continuous delivery of mobile apps - for the enterprise
TRANSCRIPT
©2015 InfoStretch Corporation
June, 2015 US - UK - India
Managing Continuous Delivery of Mobile Apps -
for the EnterpriseHarnessing the power of ultimate Mobile automation using - CI and Cloud
Apps Tested
Employees
100+ Apps
developed and deployed
3000+
Global Footprint
LocationsCorporate HQ: Silicon ValleyOffices: Conshohocken (PA), Ahmedabad (India), Pune (India), London (UK)
700+
250K
Active Mobile Customer Engagements60+
About Infostretch
Real devices in mobile labs
About usFounded in 2004 in Santa Clara, CA, InfoStretch is a leading provider of next-generation mobile application lifecycle services ranging from design and development to testing and sustenance.
2©2015 InfoStretch Corporation.
© Sauce Labs, Inc.
The Sauce Labs Platform
• Test web + mobile apps across more than 500+ browser/OS/platforms
• Enterprise scalability + Security + industry standard SLA
• Capture screencasts, logs and test metadata
4
Agenda What is CI? Why CI and Value to Business CI Implementation and Architecture Mobile Cloud Solutions & CI Case Study
©2015 InfoStretch Corporation.
5
What is CI?
Continuous Integration is a software practice in which isolated code changes are immediately tested and reported on as soon as they are added to the code base.
Key Principles of CI include: Implement Source Control system Automate the Build Process Frequent Commits, Code Consolidation, Fast builds Automated Deployment Self testing the builds: Unit tests, Code Quality, Static Analysis Testing in a Clone to Production environment Automate User Acceptance Test Dashboards for Reporting
©2015 InfoStretch Corporation.
6
What is CI?
Continuous Integration is a software practice in which isolated code changes are immediately tested and reported on as soon as they are added to the code base.
Key Principles of CI include: Implement Source Control system Automate the Build Process Frequent Commits, Code Consolidation, Fast builds Automated Deployment Self testing the builds: Unit tests, Code Quality, Static Analysis Testing in a Clone to Production environment Automate User Acceptance Test Dashboards for Reporting
©2015 InfoStretch Corporation.
7
Source Control
©2015 InfoStretch Corporation.
Git Decentralized, and aims to be fast, flexible, and robust
Subversion Open source version control system inspired by CVS
CVS Built on RCS, with emphasis put on security and source code correctness
Stash Create and manage repositories, integrate with JIRA for end to end traceability,
collaborate on code and instantly scale with high performance.
8
What is CI?
Continuous Integration is a software practice in which isolated code changes are immediately tested and reported on as soon as they are added to the code base.
Key Principles of CI include: Implement Source Control system Automate the Build Process Frequent Commits, Code Consolidation, Fast builds Automated Deployment Self testing the builds: Unit tests, Code Quality, Static Analysis Testing in a Clone to Production environment Automate User Acceptance Test Dashboards for Reporting
©2015 InfoStretch Corporation.
9
Build Automation
Shell scripts Tools: Maven, Gradle, Ant, Spring IO, ChaiOne, Xcodebuild
©2015 InfoStretch Corporation.
10
CI Build Tool
©2015 InfoStretch Corporation.
Jenkins / (fka Hudson) Open source continuous integration tool written in Java
Circle CI CircleCI supports every component of a modern application, including mobile
apps (iOS and Android)
Bamboo Bamboo is a continuous integration server from Atlassian
TeamCity Continuous integration and build management system
11
What is CI?
Continuous Integration is a software practice in which isolated code changes are immediately tested and reported on as soon as they are added to the code base.
Key Principles of CI include: Implement Source Control system Automate the Build Process Frequent Commits, Code Consolidation, Fast builds Automated Deployment Self testing the builds: Unit tests, Code Quality, Static Analysis Testing in a Clone to Production environment Automate User Acceptance Test Dashboards for Reporting
©2015 InfoStretch Corporation.
12
Automate Deployment
Deploy Mobile apps to Physical devices/ emulators using deployment tools
Tools: Testflight, Hockey App, IBM Urban Code, etc
©2015 InfoStretch Corporation.
13
What is CI?
Continuous Integration is a software practice in which isolated code changes are immediately tested and reported on as soon as they are added to the code base.
Key Principles of CI include: Implement Source Control system Automate the Build Process Frequent Commits, Code Consolidation, Fast builds Automated Deployment Self testing the builds: Unit tests, Code Quality, Static Analysis Testing in a Clone to Production environment Automate User Acceptance Test Dashboards for Reporting
©2015 InfoStretch Corporation.
14
Self Testing BuildsCode quality tools like: SonarQube and Static Analysis tools like: Fortify
©2015 InfoStretch Corporation.
Junit A popular framework for writing unit tests in Java/J2EE environment
TestNG Similar to jUnit, but provides dependencies and expanded annotations
Rspec Behaviour-driven development framework
15
What is CI?
Continuous Integration is a software practice in which isolated code changes are immediately tested and reported on as soon as they are added to the code base.
Key Principles of CI include: Implement Source Control system Automate the Build Process Frequent Commits, Code Consolidation, Fast builds Automated Deployment Self testing the builds: Unit tests, Code Quality, Static Analysis Testing in a Clone to Production environment Automate User Acceptance Test Dashboards for Reporting
©2015 InfoStretch Corporation.
16
Testing in Clone to Production
Load/Performance testing using tools like Soasta
©2015 InfoStretch Corporation.
• Environment Automation Tools allow teams to define environment, system, and application configurations and parameters such that downstream environments can be automatically provisions and any conflicts between expected application parameters can be identified
• Common Tools: Puppet, Chef, Ansible
Test Environment Automation
17
Why CI?
6) You do not have automated builds or automated tests in place.
1) Mobile apps live and die by their ratings in an App Store
2) You are "going commando" without source code management for your mobile app deployment process. No tracking. No rollback.
3) You are deploying manually between environments
5) You are stuck in a "hot mess" of hotfixes
4) You are editing configurations manually, doing it on staging or production environments
©2015 InfoStretch Corporation.
Agile Testing Success Mantras!
One team approach Co-locate, Empower, 2 Pizza Teams Advanced – Read Spotify Model of Squad/Tribes/Guilds (
https://dl.dropboxusercontent.com/u/1018963/Articles/SpotifyScaling.pdf)
QA Engage early Quality is every ones responsibility QA Ops Focus is important
CI, Tools, Infrastructure (lab), Reporting, Dependency Management
Invest in Scale – goal to run deploy+automation in under 60 m Design and implement for Testability Focus on Automation – automate every thing – smoke->regression CI is the life saver
19
Enterprise Shift Left Objectives
• Write Automation Early• Find Defects Early/Lower defects in Prod• Run Automation in Dev Environments• Engage every one (at least QA in Automation)• Keep Test cases in sync with user stories
Shift Quality Left
• Higher Confidence in builds• Increase Engineering Velocity• Increase Scale – Make automation massively parallel (check-in to release in 60 minutes)
Make build and deployment more reliable
• Reduce regression cost and time• Automate Ops – CI, Deployments, Test Data and Environment Buildup• Automate root cause analysis• Isolate Layers (Mock Objects and Virtualization)
Automate the Quality Process
21
Why BDD?
• Faster cycle time – Shift-Left imperative
• Easy to understand tests and test results
• Closer QE/Dev/Product collaboration to help us get the tests right early
• Features and Scenarios serve as easy to access, verifiable, living documentation of an application
22
Value to Business
©2015 InfoStretch Corporation.
Key Benefits of Continuous Integration
Early defect detection
Measurable health of software
Brings qualityassurance
Reduce overheads
Better projectvisibility
Reduce assumptions
23
CI/CD Process
©2015 InfoStretch Corporation.
DELIVERY TEAM VERSION CONTROL BUILD & UNIT TESTS AUTOMATED ACCEPTANCE TESTS
USERACCEPTANCE TESTS RELEASE
check intrigger
feedback
check intrigger
feedbacktrigger
feedback
check intrigger
triggerapproval
approvalfeedbackfeedback
START
24
CI Jumpstart with InfoStretch
REVIEW1 to 2 weeks
Understand the expectation from the different stakeholders
Understand branching strategy
Qualification of the buildsproduct and maintenance release cycle
Understand dependency managements
Understand the release engineering policies
DEFINE4 to 6 weeks
Development & release build environments
Multi-site development coordination – broken builds resolutions
Release engineering and CI flow design
Define branching and merging strategy
Define CI test automation execution
DEPLOY2 to 4 weeks
CI Tools selection
Design trunk, branching and merging strategy
to support product development
Design step by step CI flow and scripts needed
Automate software builds and packaging deployment scripts
Validate starting, executing and report of
basic build test verification
1|
©2015 InfoStretch Corporation.
2| 3|
25
CI/CD Architecture Using Mobile Cloud
©2015 InfoStretch Corporation.
GitHub/SVN/TFS
Jenkins/Hudson/TeamCity/CircleCI
push codecode review
Developers
daily build
build on push
test on push
Data CenterCI Machines
nightly regressiontest on push
iOS/Android devices
Dashboard
Functional, Non-Functional, Regression, Smoke Tests…
iOS/Android simulators
26
CI tools & Mobile Cloud Integration
©2015 InfoStretch Corporation.
Benefits of harnessing - CI and Cloud:
Flexible and Mobile-ready Plugins Unlimited Scalability and Device Elasticity Leverage Existing Processes and Assets Within An
Organization Enhance Mobile CI Workflow in Real User Conditions On-demand Availability Faster Issue Resolution
Mobile QA Solutions
ON-DEMAND CLOUD AUTOMATION SUPPORT
INTEGRATION WITH SUPPORT SYSTEMS
What does it offer?
Case Study: CI implementation for Leading Healthcare Provider
Customer Challenges Slow automation execution Time- 22 mins per test case Sequential module wise execution on one device @ a time Already automated script not utilizing in regression cycles Lots of test data dependencies and require regular
maintenance No framework available for Responsive web design for mobile
InfoStretch Approach Recommended best practices for automating native
& web app using device cloud
Collaborated with Scrum Team and understand web-service/JSON role in test data generation/creation
Setup continuous integration for nightly execution for utilizing cloud devices on free time
Proposed HP ALM integration along with Jenkins for complete automation life cycle
Engagement Benefits Optimize automation execution to 8-10 mins per test
cases [Reduce 50%]
Enabling parallel execution on Selenium Grid
Utilizing automation script in regular code drop/release cycle [2-3 times per week- average 1200 test cases executed in each cycle]
Develop framework utilizing JSON response instead of test data in xls sheet on run time. [Almost 0% test data dependency and maintenance]
Created new framework which supports common code for execution on desktop and mobile browsers on emulators/real devices for Response Web design