Download - Continous Integration: A Case Study

Transcript
Page 1: Continous Integration: A Case Study

Continuous Integration: A case study

Vaibhav Kothari

Page 2: Continous Integration: A Case Study

Vaibhav Kothari

• Over 6 years of industry experience– Quality Assurance – Lead, Talentica Software– Quality Analyst, Infosys

• Education– B Tech, IIT Delhi

Page 3: Continous Integration: A Case Study

Abstract

• Developer’s dilemma• QA’s dilemma• Continuous Integration ?• Case study• What is accomplished?• Benefits of CI• Recommended Practices• Other Tools Available• Q&A

Page 4: Continous Integration: A Case Study

Thought Exercise

• Goliath: Can you please get the build for client demo?

• David: OK…..oOPs! The build is failing!

Page 5: Continous Integration: A Case Study

Developer’s dilemma

• Will my changes integrate successfully with all versions of code?

• How much time/effort will it take to build and deploy from different source repository branches?

• Why can’t QA take this up?

Page 6: Continous Integration: A Case Study

QA’s dilemma

• How much time/effort it will take to build and deploy from different source repository branches?

• How much time/effort will it take to test builds from different sources?

• I can't build that often!

Page 7: Continous Integration: A Case Study

Continuous Integration??

As wiki says

“ Continuous integration involves integrating early and often, so as to avoid the pitfalls of "integration hell". The practice aims to reduce rework and thus reduce cost and time.”

Page 8: Continous Integration: A Case Study

Continuous Integration….

Page 9: Continous Integration: A Case Study

Continuous Integration….

• Integrating the build process with continuous development.

• Concurrent build preparation from different branches.

• Integrating build system with deployment and test automation.

• Monitoring build and test.

Page 10: Continous Integration: A Case Study

CI in Agile development

Page 11: Continous Integration: A Case Study

Case Study

Current Product development Lifecycle

trunk

Shop1

Shop2

Shop3

Dev Team A

Dev Team B

Branch1

Branch2

Dev Team C

Shop1

Shop2

Shop3

QA Team A

QA Team B

Bui

ldB

uild

De

plo

ymen

tD

epl

oym

ent

Sm

oke

Te

stS

mo

ke T

est

Page 12: Continous Integration: A Case Study

Where does integration server stands ?

trunk

Shop1

Shop2

Shop3

Dev Team A

Dev Team B

Branch1

Branch2

Dev Team C

Shop1

Shop2

Shop3

QA Team A

QA Team BCon

tinuo

us In

tegr

atio

n se

rver

Bui

ld

Deployment

Functional TestS

mok

e T

est

Case Study

Page 13: Continous Integration: A Case Study

Features to look out for

• Basic Continuous Integration

• Build Triggering options

• Support for tools

• Set ups and usability

• Build logs and metrics

• Notifications

• Plugins, Extensions

Case Study

Page 14: Continous Integration: A Case Study

Hudson CI Open source tool available as deployable war file.

Each build and deployment process can be set up as a separate project and run concurrently or subsequently.

Supports distributed builds

The most used CI server in an informal developer survey!

Case Study

Page 15: Continous Integration: A Case Study

Tools to be Integrated

Windows XP/LinuxOS

Selenium RCTest Automation

Apache Tomcat 6.0Web server

Apache AntBuild Tool

SubversionVersion control

Hudson CIContinuous Integration

Case Study

Page 16: Continous Integration: A Case Study

Case Study: Setting up a Build Job…

Page 17: Continous Integration: A Case Study

Case Study: Defining Build Triggers…

Page 18: Continous Integration: A Case Study

Post build tasks

– Automate build and deployment process and server restart.

– Integrate Hudson with test automation suite

– Remote deployment of multiple builds and test suite invocation

Case Study

Page 19: Continous Integration: A Case Study

Case Study: Post build tasks…

Page 20: Continous Integration: A Case Study

Distributed Builds

– Build distribution using Single Hudson installation.

– Single click using Master/Slave mode.

– Concurrency in largely distributed projects.

Case Study

Page 21: Continous Integration: A Case Study

Master Server

Slave build servers

Case Study

Page 22: Continous Integration: A Case Study

Case Study…Slave set up in Hudson

Page 23: Continous Integration: A Case Study

Case Study….What’s achieved?

Page 24: Continous Integration: A Case Study

– Nobody minds it! Single click process.

– Early identification of build issues.

– Early identification of bugs.

– Incremental development.

– Constant availability of sane build.

– Efficient use of Test Automation.

– More time for Quality improvement.

Benefits of CI

Page 25: Continous Integration: A Case Study

– Maintain a code repository

– Automate the build and Deployment

– Make your build self-testing

– Everyone commits every day

– Every commit (to mainline) should be built

– Keep the build fast

– Test in a clone of the production environment

– Everyone can see the results of the latest build

Recommended Practices

Page 26: Continous Integration: A Case Study

Other Tools Available

Tools Advantages LimitationsCruise Control - Supports wide project and SCM tool.

- Good notification techniques

- Large number of plugins

- Complicated set up

- XML based configuration

Continuum - Easy to install and use

- Web Administrative console

- Not suitable for big projects

Luntbuild - Easy to install and use

- Web Administrative console

- Supports wide range of tools

- Not support remote project build up

TeamCity - Supports distributed build

- Professional support (JetBrains)

- Advanced options

-Commercial tool (free for 10 projects)

Bamboo -Advanced distributed build options

-Integrates with JIRA

- Commercial tools

Page 27: Continous Integration: A Case Study

Q&A