SlideShare uma empresa Scribd logo
1 de 17
Reliable Software Releases through Build, Test, and
Deployment Automation
Chapter 3. Continuous Integration
Jez Humble, David Farley
Continuous Delivery
Continuous Integration
• Requires that every time somebody commits any change, the entire
application is built and a comprehensive set of automated tests is run
against it.
• The goal of continuous integration is that the software is in a working state
all the time.
• The teams that use continuous integration effectively are able to deliver
software much faster, and with fewer bugs, than teams that do not.
What You Need Before You
Start
• Version Control
• An Automated Build
• Agreement of the Team
Version Control
• Everything in your project must be checked in to a single version control
repository: code, tests, database scripts, build and deployment scripts, and
anything else needed to create, install, run, and test your application.
• Some people don’t consider their project big enough to warrant the use
of version control. We don’t believe that there is a project small enough to
do without it
An Automated Build
• You need to be able to run your build process in an automated way from
your continuous integration environment so that it can be audited when
things go wrong.
• Your build scripts should be treated like your codebase. They should be
tested and constantly refactored so that they are tidy and easy to
understand. It’s impossible to do this with an IDE-generated build process.
This gets more and more important the more complex the project becomes.
• It makes understanding, maintaining, and debugging the build easier, and
allows for better collaboration with operations people.
Agreement of the Team
• Continuous integration is a practice, not a tool. It requires a degree of
commitment and discipline from your development team.
• You need everyone to check in small incremental changes frequently to
mainline and agree that the highest priority task on the project is to fix any
change that breaks the application.
• If people don’t adopt the discipline necessary for it to work, your attempts
at continuous integration will not lead to the improvement in quality that
you hope for.
Prerequisites for Continuous
Integration
• Check In Regularly.
• Create a Comprehensive Automated Test Suite
• Keep the Build and Test Process Short.
• Managing Your Development Workspace
Check In Regularly
• The most important practice for continuous integration to work properly is
frequent check-ins to trunk or mainline.
• It makes your changes smaller and thus less likely to break the build. It
means you have a recent knowngood version of the software to revert to
when you make a mistake or go down the wrong path.
• It helps you to be more disciplined about your refactoring and stick to small
changes that preserve behavior. It helps to ensure that changes altering a
lot of files are less likely to conflict with other people’s work
Create a Comprehensive Automated
Test Suite
• If you don’t have a comprehensive suite of automated tests, a passing build
only means that the application could be compiled and assembled.
• While for some teams this is a big step, it’s essential to have some level of
automated testing to provide confidence that your application is actually
working.
• Should provide an extremely high level of confidence that any introduced
change has not broken existing functionality.
Keep the Build and Test Process Short.
If it takes too long to build the code and run the unit tests, you will run into the
following problems:
• People will stop doing a full build and running the tests before they check
in. You will start to get more failing builds.
• The continuous integration process will take so long that multiple commits
will have taken place by the time you can run the build again, so you won’t
know which check-in broke the build.
• People will check in less often because they have to sit around for ages
waiting for the software to build and the tests to run.
Managing Your Development
Workspace
• Developers should always work from a knowngood starting point when they
begin a fresh piece of work. They should be able to run the build, execute
the automated tests, and deploy the application in an environment under
their control. In general, this should be on their own local machine.
• For most projects, the third-party libraries they depend on don’t change
very frequently, so the simplest solution of all is to commit these libraries
into your version control system along with your source code.
• In fact, one sign of a good application architecture is that it allows the
application to be run without much trouble on a development machine.
Essential Practices
• Don’t Check In on a Broken Build
• Wait for Commit Tests to Pass before Moving On
• Never Go Home on a Broken Build
• Always Be Prepared to Revert to the Previous Revision
Essential Practices
• Time-Box Fixing before Reverting
• Don’t Comment Out Failing Tests.
• Take Responsibility for All Breakages That Result from Your Changes
• Test-Driven Development
SUMMARY
• To implement continuous integration is to create a paradigm shift in your
team. Without CI, your application is broken until you prove otherwise.
• With CI, the default state of your application is working, albeit with a level of
confi- dence that depends upon the extent of your automated test
coverage.
• CI creates a tight feedback loop which allows you to find problems as soon
as they are introduced, when they are cheap to fix.
SUMMARY
• Implementing CI forces you to follow two other important practices: good
configuration management and the creation and maintenance of an
automated build and test process.
• CI requires good team discipline. What is different about continuous
integration is that you have a simple indicator of whether or not discipline is
being followed: The build stays green.
• If you discover that the build is green but there is insufficient discipline, for
example poor unit test coverage, you can easily add checks to your CI
system to enforce better behavior.
SUMMARY
An established CI system is a foundation on which you can build more
infrastructure:
• Big visible displays which aggregate information from your build system
to provide high-quality feedback.
• A system of reference for reports and installers for your testing team.
• A provider of data on the quality of the application for project managers.
• A system that can be extended out to production, using the deployment
pipeline, which provides testers and operations staff with push-button
deployments.
Andrés Callejas González
Universidad Pontificia Bolivariana

Mais conteúdo relacionado

Mais procurados

User acceptance testing_(uat) 2013
User acceptance testing_(uat) 2013User acceptance testing_(uat) 2013
User acceptance testing_(uat) 2013
Amrita Sinha
 
User Acceptance Testing (Uat)
User Acceptance Testing (Uat)User Acceptance Testing (Uat)
User Acceptance Testing (Uat)
Thomas Martin
 

Mais procurados (20)

Presentation On Software Testing Bug Life Cycle
Presentation On Software Testing Bug Life CyclePresentation On Software Testing Bug Life Cycle
Presentation On Software Testing Bug Life Cycle
 
Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI
 
User acceptance testing_(uat) 2013
User acceptance testing_(uat) 2013User acceptance testing_(uat) 2013
User acceptance testing_(uat) 2013
 
Bug life cycle
Bug life cycleBug life cycle
Bug life cycle
 
Agile Acceptance testing with Fitnesse
Agile Acceptance testing with FitnesseAgile Acceptance testing with Fitnesse
Agile Acceptance testing with Fitnesse
 
UAT Kickoff Presentation 10 29 09
UAT Kickoff Presentation 10 29 09UAT Kickoff Presentation 10 29 09
UAT Kickoff Presentation 10 29 09
 
Agile QA process
Agile QA processAgile QA process
Agile QA process
 
Test Automation
Test AutomationTest Automation
Test Automation
 
Bug life cycle
Bug life cycleBug life cycle
Bug life cycle
 
Agile QA Automation process
Agile QA Automation processAgile QA Automation process
Agile QA Automation process
 
Continuous Delivery without Test Automation @STPCon, San Diego
Continuous Delivery without Test Automation @STPCon, San DiegoContinuous Delivery without Test Automation @STPCon, San Diego
Continuous Delivery without Test Automation @STPCon, San Diego
 
What is component testing | David Tzemach
What is component testing | David TzemachWhat is component testing | David Tzemach
What is component testing | David Tzemach
 
Agile Testing…or Walking Dead Testing?
Agile Testing…or Walking Dead Testing?Agile Testing…or Walking Dead Testing?
Agile Testing…or Walking Dead Testing?
 
Development and test infrastructure
Development and test infrastructureDevelopment and test infrastructure
Development and test infrastructure
 
Building an Automation Framework
Building an Automation FrameworkBuilding an Automation Framework
Building an Automation Framework
 
Smoke Testing
Smoke TestingSmoke Testing
Smoke Testing
 
User Acceptance Testing (Uat)
User Acceptance Testing (Uat)User Acceptance Testing (Uat)
User Acceptance Testing (Uat)
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Agile Development and Continuous Testing
Agile Development and Continuous TestingAgile Development and Continuous Testing
Agile Development and Continuous Testing
 
What is Integration Testing? | Edureka
What is Integration Testing? | EdurekaWhat is Integration Testing? | Edureka
What is Integration Testing? | Edureka
 

Destaque

Destaque (20)

Continuous delivery
Continuous deliveryContinuous delivery
Continuous delivery
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Construir tests
Construir testsConstruir tests
Construir tests
 
Refactoring: Improving the design of existing code. Chapter 6.
Refactoring: Improving the design of existing code. Chapter 6.Refactoring: Improving the design of existing code. Chapter 6.
Refactoring: Improving the design of existing code. Chapter 6.
 
Continuos Delivery Commit stage
Continuos Delivery Commit stageContinuos Delivery Commit stage
Continuos Delivery Commit stage
 
Chapter 5 refactoring
Chapter 5 refactoringChapter 5 refactoring
Chapter 5 refactoring
 
Capitulo 7 moving features between objects
Capitulo 7  moving features between objectsCapitulo 7  moving features between objects
Capitulo 7 moving features between objects
 
Capitulo 2
Capitulo 2Capitulo 2
Capitulo 2
 
Expo 2 parametros
Expo 2   parametrosExpo 2   parametros
Expo 2 parametros
 
Refactoring: improving the desing of existing code Cap 1
Refactoring: improving the desing of existing code Cap 1Refactoring: improving the desing of existing code Cap 1
Refactoring: improving the desing of existing code Cap 1
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Continuous Delivery: Integrating the Deployment Pipeline Toolchain Through Au...
Continuous Delivery: Integrating the Deployment Pipeline Toolchain Through Au...Continuous Delivery: Integrating the Deployment Pipeline Toolchain Through Au...
Continuous Delivery: Integrating the Deployment Pipeline Toolchain Through Au...
 
JSM INFOTECH PVT. LTD
JSM INFOTECH PVT. LTDJSM INFOTECH PVT. LTD
JSM INFOTECH PVT. LTD
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Leveraging CI/CD to improve open stack operation
Leveraging CI/CD to improve open stack operationLeveraging CI/CD to improve open stack operation
Leveraging CI/CD to improve open stack operation
 
Making method calls_simpler
Making method calls_simplerMaking method calls_simpler
Making method calls_simpler
 
CI/CD for everyone else
CI/CD for everyone elseCI/CD for everyone else
CI/CD for everyone else
 
It automation & devops - devopsdays istambul 2016
It automation & devops -  devopsdays istambul 2016It automation & devops -  devopsdays istambul 2016
It automation & devops - devopsdays istambul 2016
 
DesignReport
DesignReportDesignReport
DesignReport
 
Infra / Cont delivery - 3rd party automation
Infra / Cont delivery - 3rd party automationInfra / Cont delivery - 3rd party automation
Infra / Cont delivery - 3rd party automation
 

Semelhante a Continuos Delivery

Magenic-White-Paper-Continuous-Inegration-for-QA-Teams
Magenic-White-Paper-Continuous-Inegration-for-QA-TeamsMagenic-White-Paper-Continuous-Inegration-for-QA-Teams
Magenic-White-Paper-Continuous-Inegration-for-QA-Teams
Aaron Humerickhouse
 
Curiosity Software Presents: Modelling for Continuous Testing
Curiosity Software Presents: Modelling for Continuous TestingCuriosity Software Presents: Modelling for Continuous Testing
Curiosity Software Presents: Modelling for Continuous Testing
Curiosity Software Ireland
 

Semelhante a Continuos Delivery (20)

Devops
DevopsDevops
Devops
 
DevOps Overview in my own words
DevOps Overview in my own wordsDevOps Overview in my own words
DevOps Overview in my own words
 
Continuous integration with Jenkins
Continuous integration with JenkinsContinuous integration with Jenkins
Continuous integration with Jenkins
 
Preparing for DevOps
Preparing for DevOpsPreparing for DevOps
Preparing for DevOps
 
Continuous delivery
Continuous deliveryContinuous delivery
Continuous delivery
 
Testing in the new age of DevOps
Testing in the new age of DevOpsTesting in the new age of DevOps
Testing in the new age of DevOps
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
Magenic-White-Paper-Continuous-Inegration-for-QA-Teams
Magenic-White-Paper-Continuous-Inegration-for-QA-TeamsMagenic-White-Paper-Continuous-Inegration-for-QA-Teams
Magenic-White-Paper-Continuous-Inegration-for-QA-Teams
 
DevOps Engineering.pptx
DevOps Engineering.pptxDevOps Engineering.pptx
DevOps Engineering.pptx
 
Software testing
Software testingSoftware testing
Software testing
 
An Ultimate Guide to Continuous Testing in Agile Projects.pdf
An Ultimate Guide to Continuous Testing in Agile Projects.pdfAn Ultimate Guide to Continuous Testing in Agile Projects.pdf
An Ultimate Guide to Continuous Testing in Agile Projects.pdf
 
Curiosity Software Presents: Modelling for Continuous Testing
Curiosity Software Presents: Modelling for Continuous TestingCuriosity Software Presents: Modelling for Continuous Testing
Curiosity Software Presents: Modelling for Continuous Testing
 
Ncerc rlmca202 adm m1 ssm
Ncerc rlmca202 adm m1 ssmNcerc rlmca202 adm m1 ssm
Ncerc rlmca202 adm m1 ssm
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Continuous Integration vs Continuous Delivery vs Continuous Deployment
Continuous Integration vs Continuous Delivery vs Continuous Deployment Continuous Integration vs Continuous Delivery vs Continuous Deployment
Continuous Integration vs Continuous Delivery vs Continuous Deployment
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Flight East 2018 Presentation–Continuous Integration––An Overview
Flight East 2018 Presentation–Continuous Integration––An OverviewFlight East 2018 Presentation–Continuous Integration––An Overview
Flight East 2018 Presentation–Continuous Integration––An Overview
 
What is Continuous Integration and Continuous Delivery
What is Continuous Integration and Continuous Delivery What is Continuous Integration and Continuous Delivery
What is Continuous Integration and Continuous Delivery
 
How to Implement shift left testing
How to Implement shift left testingHow to Implement shift left testing
How to Implement shift left testing
 

Último

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Último (20)

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

Continuos Delivery

  • 1. Reliable Software Releases through Build, Test, and Deployment Automation Chapter 3. Continuous Integration Jez Humble, David Farley Continuous Delivery
  • 2. Continuous Integration • Requires that every time somebody commits any change, the entire application is built and a comprehensive set of automated tests is run against it. • The goal of continuous integration is that the software is in a working state all the time. • The teams that use continuous integration effectively are able to deliver software much faster, and with fewer bugs, than teams that do not.
  • 3. What You Need Before You Start • Version Control • An Automated Build • Agreement of the Team
  • 4. Version Control • Everything in your project must be checked in to a single version control repository: code, tests, database scripts, build and deployment scripts, and anything else needed to create, install, run, and test your application. • Some people don’t consider their project big enough to warrant the use of version control. We don’t believe that there is a project small enough to do without it
  • 5. An Automated Build • You need to be able to run your build process in an automated way from your continuous integration environment so that it can be audited when things go wrong. • Your build scripts should be treated like your codebase. They should be tested and constantly refactored so that they are tidy and easy to understand. It’s impossible to do this with an IDE-generated build process. This gets more and more important the more complex the project becomes. • It makes understanding, maintaining, and debugging the build easier, and allows for better collaboration with operations people.
  • 6. Agreement of the Team • Continuous integration is a practice, not a tool. It requires a degree of commitment and discipline from your development team. • You need everyone to check in small incremental changes frequently to mainline and agree that the highest priority task on the project is to fix any change that breaks the application. • If people don’t adopt the discipline necessary for it to work, your attempts at continuous integration will not lead to the improvement in quality that you hope for.
  • 7. Prerequisites for Continuous Integration • Check In Regularly. • Create a Comprehensive Automated Test Suite • Keep the Build and Test Process Short. • Managing Your Development Workspace
  • 8. Check In Regularly • The most important practice for continuous integration to work properly is frequent check-ins to trunk or mainline. • It makes your changes smaller and thus less likely to break the build. It means you have a recent knowngood version of the software to revert to when you make a mistake or go down the wrong path. • It helps you to be more disciplined about your refactoring and stick to small changes that preserve behavior. It helps to ensure that changes altering a lot of files are less likely to conflict with other people’s work
  • 9. Create a Comprehensive Automated Test Suite • If you don’t have a comprehensive suite of automated tests, a passing build only means that the application could be compiled and assembled. • While for some teams this is a big step, it’s essential to have some level of automated testing to provide confidence that your application is actually working. • Should provide an extremely high level of confidence that any introduced change has not broken existing functionality.
  • 10. Keep the Build and Test Process Short. If it takes too long to build the code and run the unit tests, you will run into the following problems: • People will stop doing a full build and running the tests before they check in. You will start to get more failing builds. • The continuous integration process will take so long that multiple commits will have taken place by the time you can run the build again, so you won’t know which check-in broke the build. • People will check in less often because they have to sit around for ages waiting for the software to build and the tests to run.
  • 11. Managing Your Development Workspace • Developers should always work from a knowngood starting point when they begin a fresh piece of work. They should be able to run the build, execute the automated tests, and deploy the application in an environment under their control. In general, this should be on their own local machine. • For most projects, the third-party libraries they depend on don’t change very frequently, so the simplest solution of all is to commit these libraries into your version control system along with your source code. • In fact, one sign of a good application architecture is that it allows the application to be run without much trouble on a development machine.
  • 12. Essential Practices • Don’t Check In on a Broken Build • Wait for Commit Tests to Pass before Moving On • Never Go Home on a Broken Build • Always Be Prepared to Revert to the Previous Revision
  • 13. Essential Practices • Time-Box Fixing before Reverting • Don’t Comment Out Failing Tests. • Take Responsibility for All Breakages That Result from Your Changes • Test-Driven Development
  • 14. SUMMARY • To implement continuous integration is to create a paradigm shift in your team. Without CI, your application is broken until you prove otherwise. • With CI, the default state of your application is working, albeit with a level of confi- dence that depends upon the extent of your automated test coverage. • CI creates a tight feedback loop which allows you to find problems as soon as they are introduced, when they are cheap to fix.
  • 15. SUMMARY • Implementing CI forces you to follow two other important practices: good configuration management and the creation and maintenance of an automated build and test process. • CI requires good team discipline. What is different about continuous integration is that you have a simple indicator of whether or not discipline is being followed: The build stays green. • If you discover that the build is green but there is insufficient discipline, for example poor unit test coverage, you can easily add checks to your CI system to enforce better behavior.
  • 16. SUMMARY An established CI system is a foundation on which you can build more infrastructure: • Big visible displays which aggregate information from your build system to provide high-quality feedback. • A system of reference for reports and installers for your testing team. • A provider of data on the quality of the application for project managers. • A system that can be extended out to production, using the deployment pipeline, which provides testers and operations staff with push-button deployments.
  • 17. Andrés Callejas González Universidad Pontificia Bolivariana