automated testing and continuous deployment for mobile apps with jenkins

16
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

Upload: cloudbees

Post on 10-May-2015

2.456 views

Category:

Technology


6 download

DESCRIPTION

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)

TRANSCRIPT

Page 1: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

Kohsuke Kawaguchi and Mark Prichard, CloudBeesMatt Solnit, SOASTAAugust 30, 2012

@CloudBees, @CloudTest, @NewRelic

Page 2: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

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

Page 3: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

3

• 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

Why Jenkins for mobile development?

Page 4: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

4

• Appaloosa plugin, TestFlight plugin– continuous app distribution

• Xcode plugin– Better UI for xcode command

invocations

More iOS+Jenkins love we won’t cover

Page 5: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

5

• 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

We got Android covered, too

Page 6: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

6

• Some apps don’t need external data• But most do– Push notifications– Location information– Twitter, news feeds– Social interaction– Integration

What makes a great mobile app?

Page 7: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

7

StockFish … … or Social Chess?

Standalone … … or Integrated?

Two Five-Star Apps

or BOTH?

Page 8: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

8

• 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

Building a “Social” Chess Server

Page 9: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

9

• 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

Fun App – but ‘Real’ Java Development

Page 10: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

10

• 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

Testing, Testing, Testing

Page 11: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

11

Jenkins to the Rescue

Jenkins

iOS Development (Xcode)

Services Development

(Eclipse)

Services Deployment

iOS Packaging/Distrib

ution

Services Build/Unit Test

iOS App Build/Unit Test

Integration/Functional

Testing

iOS TouchTest

Source Code Repository

Page 12: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

12

• 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

What you will see

Page 13: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

13

Jenkins and Agile CI Best Practices

MonitorRepository

Build Code

Test Code

StageApplication

ContinuousDeployment

Continuous Integration The Key to Agile and Lean Development

• Better quality

products

• Faster delivery

• Scale teams

Page 14: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

14

Jenkins and Agile CI Best Practices

©2012 CloudBees, Inc. All Rights Reserved

MonitorRepository

Build Code

Test Code

StageApplication

ContinuousDeployment

Jenkins in the CloudThe Key to Agile and Lean Development

• Unlimited

scalability

• Use what you need

• Seamless tie-in to

PaaS

Page 15: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

15

• 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

Sign Up with CloudBees

Page 16: Automated Testing and Continuous Deployment for Mobile Apps with Jenkins

16

Jenkins User Conference, San Francisco Sept 30, 2012

Kohsuke Kawaguchitwitter: @kohsukekawaemail: [email protected]

Mark Prichardtwitter: @mqprichard email: [email protected]

Matt Solnittwitter: @msolnitemail: [email protected]

Thank You – See you in San Francisco!