Slides from Silicon Valley Cloud Computing Group Meetup at Yahoo! Campus 09/30/12
Presented by Kohsuke Kawaguchi and Mark Prichard (CloudBees), with Matt Solnit (SOASTA)
How to Troubleshoot Apps for the Modern Connected Worker
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
1. Automated Testing and Continuous
Deployment for Mobile Apps with
Jenkins
Kohsuke Kawaguchi and Mark Prichard, CloudBees
Matt Solnit, SOASTA
August 30, 2012
@CloudBees, @CloudTest, @NewRelic
2. Have you met Jenkins?
• #1 OSS CI server
– Written in Java
• About 7 years old
• Easy to install/use
• Extensible via 550+ plugins
• Widely adopted
– 43K+ installations
• Kohsuke is Jenkins creator/project lead
2
3. Why Jenkins for mobile development?
• To let developers focus on developing
– Leave building, packaging, testing, distributing
to a computer
– Make the right thing the easiest thing
• Many, well-adopted mobile development
plugins
– Safety in numbers
• “Distributed builds” for scaling with workload
• “Matrix project” for easy cross device testing
3
4. More iOS+Jenkins love we won‟t cover
• Appaloosa plugin, TestFlight plugin
– continuous app distribution
• Xcode plugin
– Better UI for xcode command invocations
4
5. We got Android covered, too
• Android emulator plugin
– For running tests inside emulator in Jenkins
• Android lint plugin
– Parses & visualizes the result of static
analysis
• Zubhium plugin
– Continuous app distribution
5
6. What makes a great mobile app?
• Some apps don‟t need external data
• But most do
– Push notifications
– Location information
– Twitter, news feeds
– Social interaction
– Integration
6
7. Two Five-Star Apps
StockFish … … or Social Chess?
or BOTH?
Standalone … … or Integrated?
7
8. Building a “Social” Chess Server
• The basics: record games, moves
• Next steps: notifications, time keeping
• Going further: competition, research
• Chess client apps handle actual play
• Server doesn‟t need to know the rules
• Just for fun:
https://github.com/mqprichard/mongo-chess
8
9. Fun App – but „Real‟ Java Development
• Built using Eclipse, Maven, Junit, JAX-RS, JAX-B,
gson …
• Git repository, Jenkins build/test and app deployment
all running on AWS using CloudBees PaaS
• Free to develop: enterprise-grade runtime services
9
10. Testing, Testing, Testing
• Suppose I add some new killer feature
• What do I need to test?
– Do all components build correctly?
– Do the unit tests pass?
– Did the interfaces change?
– Have I affected the UI behavior?
• I need this all to happen continuously and
automatically – end-to-end testing
10
11. Jenkins to the Rescue
iOS
Packaging/Distri Source Code
bution Repository
iOS TouchTest iOS Development
(Xcode)
Integration/Func
tional Testing Jenkins
iOS App
Build/Unit Test
Services Services
Deployment Development
Services (Eclipse)
Build/Unit Test
11
12. What you will see
• iOS App built from GitHub/CloudBees
Forge
– Jenkins Xcode builds/tests run on MacOS
slaves
– Scripted integration tests
– Automated functional tests (SOASTA)
– Automated gesture-aware touch tests
(SOASTA)
– iOS app archive/packaging/distribution all
managed through Jenkins plug-ins
• Back-end services end-to-end deployment
– Build/Test/Deploy using Eclipse/CloudBees 12
13. Jenkins and Agile CI Best Practices
Continuous Monitor Continuous
Deployment Repository
Integration
The Key to Agile and Lean
Development
Stage Build Code • Better quality products
Application
• Faster delivery
Test Code
• Scale teams
13
14. Jenkins and Agile CI Best Practices
Continuous Monitor Jenkins in the Cloud
Deployment Repository The Key to Agile and Lean
Development
• Unlimited scalability
Stage
Application
Build Code • Use what you need
• Seamless tie-in to
Test Code
PaaS
14
15. Sign Up with CloudBees
• It‟s totally free for developers
• One click and we‟ll start you off with
Jenkins, Java, Scala/Lift, MySQL and
more
www.cloudbees.com/signup
15
16. Thank You – See you in San Francisco!
Jenkins User Conference, San Francisco Sept 30, 2012
Kohsuke Kawaguchi
twitter: @kohsukekawa
email: kkawaguchi@cloudbees.com
Mark Prichard
twitter: @mqprichard
email: mprichard@cloudbees.com
Matt Solnit
twitter: @msolnit
email: msolnit@soasta.com
16