SlideShare una empresa de Scribd logo
1 de 21
TO TDD OR NOT TO TDD
–
THAT IS THE QUESTION
Test-driven
development: lessons
from the
Jenkins Git Plugin
Mark Waite
28 Feb 2018
Agile Boulder
AN EXPERIENCE
TALK
• My biases
• My mistakes
• My misperceptions
This is a biased talk. I’m using my experiences and some data
Biased by professional experience
• 2003 – Extreme Programming - manager
Loved it and lived it for 4 years at a 200 person company
• 2007 – Scrum - manager
Lived it for 6 years at a 5000 person company
• 2013 – More scrum - director
Lived it for 3 years at a 10,000 person company
• 2017 – Technical evangelist at CloudBees
We sell and support Jenkins to Enterprises
Biased by personal experience
• 2012 – My first commit to Jenkins git plugin (Java)
• 2014 – Wrote many tests for git plugin and git client
plugin
• 2015 – Primary maintainer of git plugin and git client
plugin
• 2017 – Divided maintainer – I do legacy, Stephen does
next gen
Biased by beliefs
• I believe in Test Driven Development
TEST-DRIVEN
DEVELOPMENT
• Red – write a small failing
test
• Green – write to pass the test
• Refactor – simplify and
improve
Three simple steps
A lifetime to learn to do it well
I love tests. I write tests.
I run tests. I fix tests. Photo CC BY-SA 4.0
THE LENS OF
PROJECT
HISTORY
WHAT IS JENKINS?
Leading continuous integration server
Open source, started in 2007 as Hudson
Became Jenkins in 2011
150,000+ installations worldwide
1,300+ plugins
Active community
Strong integrations
WHAT IS GIT?
Most popular version control system
Linux kernel tracked in Git
Microsoft Windows tracked in Git
Core technology at GitHub, Bitbucket, VS Online,
…
JENKINS
GIT PLUGIN
HISTORY
Jenkins Git Plugin connects Jenkins to Git
Historical Phases of Jenkins Git Plugin
• Early adoption: 2007 -
2010
• Significant growth: 2010 – 2013
• Refactoring: 2013 - 2016
• Pipeline: 2017 - now
EARLY ADOPTION
2007 - 2010
Early adoption questions:
• Is git relevant to Jenkins users?
• Which git features matter
most?
EARLY ADOPTION
Unknowns
• User value
• Feature relevance
• Performance measures
Integration Hurdles
• Few lines of code
• Few components used
• Few components depend on us
INSTALLS AND TESTS IN
EARLY ADOPTION
0
20000
40000
60000
80000
100000
120000
140000
160000
Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18
Active Jenkins Git Plugin Installations
0
2000
4000
6000
8000
10000
12000
14000
Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18
Jenkins Git Plugin lines of code vs. test LOC
LOC Test LOC
• User needs are more important than tests
• Discover user needs by delivering
• Test interactively for fastest delivery
WIDESPREAD USE
2010 - 2013
Widespread use questions:
• Easier to use?
• Easier to diagnose?
• Next features?
WIDESPREAD USE
More confident
• User value
• Feature relevance
• Key performance measure
Integration Hurdles
• More features
• More lines of code
• More components used
• Few components depend on us
INSTALLS AND TESTS IN
WIDESPREAD USE
0
20000
40000
60000
80000
100000
120000
140000
160000
Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18
Active Jenkins Git Plugin Installations
0
2000
4000
6000
8000
10000
12000
14000
Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18
Jenkins Git Plugin lines of code vs. test LOC
LOC Test LOC
• User needs are more important than tests
• Discover user needs by delivering
• Test interactively for fastest delivery
• Feature and dependency growth is increasing
the cost of testing
REFACTORING
2013 - 2016
Resolve implementation problems
Git is winning the source control wars
More regressions from refactoring
Refactor:
• add JGit
• extract git client
REFACTORING
Confident in
• User value
• Feature relevance
• Key performance measures
Integration Hurdles
• More features
• More lines of code
• More components used
• Many components depend on us
INSTALLS AND TESTS IN
REFACTORING
0
20000
40000
60000
80000
100000
120000
140000
160000
Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18
Active Jenkins Git Plugin Installations
0
2000
4000
6000
8000
10000
12000
14000
Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18
Jenkins Git Plugin lines of code vs. test LOC
LOC Test LOC
• User needs are often failed by regressions
• Discover user needs by delivering
• Test automation for fastest delivery
• Interactive testing still finds most bugs
• Feature and dependency growth is increasing
the cost of testing
PIPELINE
2017 - NOW
Pipeline:
• GitHub, Bitbucket
optimizations
• Simpler setup and
maintenance
• Higher performance
PIPELINE
Significant new
• User value
• Features
• Key performance improved
Integration Hurdles
• More features
• More lines of code
• More components used
• Critical part of Jenkins
INSTALLS AND TESTS IN
PIPELINE
0
20000
40000
60000
80000
100000
120000
140000
160000
Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18
Active Jenkins Git Plugin Installations
0
2000
4000
6000
8000
10000
12000
14000
Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18
Jenkins Git Plugin lines of code vs. test LOC
LOC Test LOC
• Regressions are less frequent
• Discover user needs by delivering
• Test automation prevents many regressions
• Interactive testing still finds most bugs
• Feature and dependency growth is increasing
the cost of testing
WHEN CAN
I SKIP
TESTS?
Tests are not as critical if:
• Code will be discarded
• Failures are easy to detect
• Interactive testing is enough
• Risk is low from broken code
WHEN
SHOULD I
ADD
TESTS?
Tests are more critical if:
• Code will live a long time
• Failures are hard to detect
• Interactive testing is not
enough
• Risk is high from broken code

Más contenido relacionado

La actualidad más candente

Webinar: Version Control in SOASTA 57
Webinar: Version Control in SOASTA 57Webinar: Version Control in SOASTA 57
Webinar: Version Control in SOASTA 57Jennifer Finney
 
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CDDevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CDDevOps_Fest
 
DOES SFO 2016 - Ray Krueger - Speed as a Prime Directive
DOES SFO 2016 - Ray Krueger - Speed as a Prime DirectiveDOES SFO 2016 - Ray Krueger - Speed as a Prime Directive
DOES SFO 2016 - Ray Krueger - Speed as a Prime DirectiveGene Kim
 
Using JMeter in CloudTest for Continuous Testing
Using JMeter in CloudTest for Continuous TestingUsing JMeter in CloudTest for Continuous Testing
Using JMeter in CloudTest for Continuous TestingSOASTA
 
Performance Metrics Driven CI/CD - Introduction to Continuous Innovation and ...
Performance Metrics Driven CI/CD - Introduction to Continuous Innovation and ...Performance Metrics Driven CI/CD - Introduction to Continuous Innovation and ...
Performance Metrics Driven CI/CD - Introduction to Continuous Innovation and ...Mike Villiger
 
Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDBatyr Nuryyev
 
ATAGTR2017 Performance Testing of Big Data Application
ATAGTR2017 Performance Testing of Big Data ApplicationATAGTR2017 Performance Testing of Big Data Application
ATAGTR2017 Performance Testing of Big Data ApplicationAgile Testing Alliance
 
Legacy On Premise Apps Got You Down? No Problem - DevOps for All
Legacy On Premise Apps Got You Down? No Problem - DevOps for AllLegacy On Premise Apps Got You Down? No Problem - DevOps for All
Legacy On Premise Apps Got You Down? No Problem - DevOps for AllMuly Gottlieb
 
Metrics-driven Continuous Delivery
Metrics-driven Continuous DeliveryMetrics-driven Continuous Delivery
Metrics-driven Continuous DeliveryAndrew Phillips
 
Transitioning from Traditional to Modern QA
Transitioning from Traditional to Modern QATransitioning from Traditional to Modern QA
Transitioning from Traditional to Modern QASauce Labs
 
FishEye and Crucible Presentation
FishEye and Crucible PresentationFishEye and Crucible Presentation
FishEye and Crucible PresentationEllen Feaheny
 
50 production deployments a day, at least
50 production deployments a day, at least50 production deployments a day, at least
50 production deployments a day, at leastOscar Renalias
 
7 steps to pragmatic mobile testing
7 steps to pragmatic mobile testing7 steps to pragmatic mobile testing
7 steps to pragmatic mobile testingSOASTA
 
Dimensions RM: Agile Requirements Management
Dimensions RM: Agile Requirements ManagementDimensions RM: Agile Requirements Management
Dimensions RM: Agile Requirements ManagementSerena Software
 
Perforce - Under New Management by Konrad Litwin
Perforce - Under New Management by Konrad LitwinPerforce - Under New Management by Konrad Litwin
Perforce - Under New Management by Konrad LitwinPerforce
 
Roadmap to Enterprise Quality
Roadmap to Enterprise QualityRoadmap to Enterprise Quality
Roadmap to Enterprise QualityJeff Bramwell
 
App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14
App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14
App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14Uri Cohen
 
Dragging the dinosaur into the 21 century
Dragging the dinosaur into the 21 centuryDragging the dinosaur into the 21 century
Dragging the dinosaur into the 21 centuryDevOpsDays Galway
 

La actualidad más candente (20)

Webinar: Version Control in SOASTA 57
Webinar: Version Control in SOASTA 57Webinar: Version Control in SOASTA 57
Webinar: Version Control in SOASTA 57
 
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CDDevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
 
Jenkins meetup170315
Jenkins meetup170315Jenkins meetup170315
Jenkins meetup170315
 
DOES SFO 2016 - Ray Krueger - Speed as a Prime Directive
DOES SFO 2016 - Ray Krueger - Speed as a Prime DirectiveDOES SFO 2016 - Ray Krueger - Speed as a Prime Directive
DOES SFO 2016 - Ray Krueger - Speed as a Prime Directive
 
Using JMeter in CloudTest for Continuous Testing
Using JMeter in CloudTest for Continuous TestingUsing JMeter in CloudTest for Continuous Testing
Using JMeter in CloudTest for Continuous Testing
 
Performance Metrics Driven CI/CD - Introduction to Continuous Innovation and ...
Performance Metrics Driven CI/CD - Introduction to Continuous Innovation and ...Performance Metrics Driven CI/CD - Introduction to Continuous Innovation and ...
Performance Metrics Driven CI/CD - Introduction to Continuous Innovation and ...
 
What is DevOps?
What is DevOps?What is DevOps?
What is DevOps?
 
Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CD
 
ATAGTR2017 Performance Testing of Big Data Application
ATAGTR2017 Performance Testing of Big Data ApplicationATAGTR2017 Performance Testing of Big Data Application
ATAGTR2017 Performance Testing of Big Data Application
 
Legacy On Premise Apps Got You Down? No Problem - DevOps for All
Legacy On Premise Apps Got You Down? No Problem - DevOps for AllLegacy On Premise Apps Got You Down? No Problem - DevOps for All
Legacy On Premise Apps Got You Down? No Problem - DevOps for All
 
Metrics-driven Continuous Delivery
Metrics-driven Continuous DeliveryMetrics-driven Continuous Delivery
Metrics-driven Continuous Delivery
 
Transitioning from Traditional to Modern QA
Transitioning from Traditional to Modern QATransitioning from Traditional to Modern QA
Transitioning from Traditional to Modern QA
 
FishEye and Crucible Presentation
FishEye and Crucible PresentationFishEye and Crucible Presentation
FishEye and Crucible Presentation
 
50 production deployments a day, at least
50 production deployments a day, at least50 production deployments a day, at least
50 production deployments a day, at least
 
7 steps to pragmatic mobile testing
7 steps to pragmatic mobile testing7 steps to pragmatic mobile testing
7 steps to pragmatic mobile testing
 
Dimensions RM: Agile Requirements Management
Dimensions RM: Agile Requirements ManagementDimensions RM: Agile Requirements Management
Dimensions RM: Agile Requirements Management
 
Perforce - Under New Management by Konrad Litwin
Perforce - Under New Management by Konrad LitwinPerforce - Under New Management by Konrad Litwin
Perforce - Under New Management by Konrad Litwin
 
Roadmap to Enterprise Quality
Roadmap to Enterprise QualityRoadmap to Enterprise Quality
Roadmap to Enterprise Quality
 
App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14
App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14
App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14
 
Dragging the dinosaur into the 21 century
Dragging the dinosaur into the 21 centuryDragging the dinosaur into the 21 century
Dragging the dinosaur into the 21 century
 

Similar a To TDD or not to TDD - that is the question

Continuous Delivery without Significant Test Automation
Continuous Delivery without Significant Test AutomationContinuous Delivery without Significant Test Automation
Continuous Delivery without Significant Test AutomationMaaret Pyhäjärvi
 
AD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension LibraryAD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension Librarypaidi_ed
 
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...WSO2
 
Application Insights for Integration Developers
Application Insights for Integration DevelopersApplication Insights for Integration Developers
Application Insights for Integration DevelopersSriram Hariharan
 
From Iterative to Continuous Delivery, PNSQC 2014
From Iterative to Continuous Delivery, PNSQC 2014From Iterative to Continuous Delivery, PNSQC 2014
From Iterative to Continuous Delivery, PNSQC 2014John Ruberto
 
Adopting Continuous Integration in an Ops Group
Adopting Continuous Integration in an Ops GroupAdopting Continuous Integration in an Ops Group
Adopting Continuous Integration in an Ops Groupcolleenfry
 
Aniruddha_Mukherjee_CV_June_2016
Aniruddha_Mukherjee_CV_June_2016Aniruddha_Mukherjee_CV_June_2016
Aniruddha_Mukherjee_CV_June_2016Aniruddha Mukherjee
 
SanDiego_DevOps_Meetup_9212016-v8
SanDiego_DevOps_Meetup_9212016-v8SanDiego_DevOps_Meetup_9212016-v8
SanDiego_DevOps_Meetup_9212016-v8Rajwinder Singh
 
SanDiego_DevOps_Meetup_9212016
SanDiego_DevOps_Meetup_9212016SanDiego_DevOps_Meetup_9212016
SanDiego_DevOps_Meetup_9212016w2fong
 
CipherCloud Microservice Meetup - Managing Services in a Lean Startup
CipherCloud Microservice Meetup - Managing Services in a Lean StartupCipherCloud Microservice Meetup - Managing Services in a Lean Startup
CipherCloud Microservice Meetup - Managing Services in a Lean StartupShobana Radhakrishnan
 
Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014Daniel Jacobson
 
The DevOps journey in an Enterprise - CoDe-Conf. Stockholm September 14, 2017
The DevOps journey in an Enterprise - CoDe-Conf. Stockholm September 14, 2017The DevOps journey in an Enterprise - CoDe-Conf. Stockholm September 14, 2017
The DevOps journey in an Enterprise - CoDe-Conf. Stockholm September 14, 2017Anders Lundsgård
 
Oscon2014 Netflix API - Top 10 Lessons Learned
Oscon2014 Netflix API - Top 10 Lessons LearnedOscon2014 Netflix API - Top 10 Lessons Learned
Oscon2014 Netflix API - Top 10 Lessons LearnedSangeeta Narayanan
 
Accelerate User Driven Innovation [Webinar]
Accelerate User Driven Innovation [Webinar]Accelerate User Driven Innovation [Webinar]
Accelerate User Driven Innovation [Webinar]Dynatrace
 
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...TriNimbus
 
Modern software testing and processes 2019
Modern software testing and processes 2019Modern software testing and processes 2019
Modern software testing and processes 2019Karim Fanadka
 
Automation at Philips Healthcare
Automation at Philips HealthcareAutomation at Philips Healthcare
Automation at Philips HealthcareArnon Axelrod
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentNeotys
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentDynatrace
 
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems SoftwareLessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems SoftwareDevOps for Enterprise Systems
 

Similar a To TDD or not to TDD - that is the question (20)

Continuous Delivery without Significant Test Automation
Continuous Delivery without Significant Test AutomationContinuous Delivery without Significant Test Automation
Continuous Delivery without Significant Test Automation
 
AD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension LibraryAD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension Library
 
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
 
Application Insights for Integration Developers
Application Insights for Integration DevelopersApplication Insights for Integration Developers
Application Insights for Integration Developers
 
From Iterative to Continuous Delivery, PNSQC 2014
From Iterative to Continuous Delivery, PNSQC 2014From Iterative to Continuous Delivery, PNSQC 2014
From Iterative to Continuous Delivery, PNSQC 2014
 
Adopting Continuous Integration in an Ops Group
Adopting Continuous Integration in an Ops GroupAdopting Continuous Integration in an Ops Group
Adopting Continuous Integration in an Ops Group
 
Aniruddha_Mukherjee_CV_June_2016
Aniruddha_Mukherjee_CV_June_2016Aniruddha_Mukherjee_CV_June_2016
Aniruddha_Mukherjee_CV_June_2016
 
SanDiego_DevOps_Meetup_9212016-v8
SanDiego_DevOps_Meetup_9212016-v8SanDiego_DevOps_Meetup_9212016-v8
SanDiego_DevOps_Meetup_9212016-v8
 
SanDiego_DevOps_Meetup_9212016
SanDiego_DevOps_Meetup_9212016SanDiego_DevOps_Meetup_9212016
SanDiego_DevOps_Meetup_9212016
 
CipherCloud Microservice Meetup - Managing Services in a Lean Startup
CipherCloud Microservice Meetup - Managing Services in a Lean StartupCipherCloud Microservice Meetup - Managing Services in a Lean Startup
CipherCloud Microservice Meetup - Managing Services in a Lean Startup
 
Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014
 
The DevOps journey in an Enterprise - CoDe-Conf. Stockholm September 14, 2017
The DevOps journey in an Enterprise - CoDe-Conf. Stockholm September 14, 2017The DevOps journey in an Enterprise - CoDe-Conf. Stockholm September 14, 2017
The DevOps journey in an Enterprise - CoDe-Conf. Stockholm September 14, 2017
 
Oscon2014 Netflix API - Top 10 Lessons Learned
Oscon2014 Netflix API - Top 10 Lessons LearnedOscon2014 Netflix API - Top 10 Lessons Learned
Oscon2014 Netflix API - Top 10 Lessons Learned
 
Accelerate User Driven Innovation [Webinar]
Accelerate User Driven Innovation [Webinar]Accelerate User Driven Innovation [Webinar]
Accelerate User Driven Innovation [Webinar]
 
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
 
Modern software testing and processes 2019
Modern software testing and processes 2019Modern software testing and processes 2019
Modern software testing and processes 2019
 
Automation at Philips Healthcare
Automation at Philips HealthcareAutomation at Philips Healthcare
Automation at Philips Healthcare
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile Development
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile Development
 
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems SoftwareLessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
 

Más de Mark Waite

Training as Code - Applying CI/CD to training
Training as Code - Applying CI/CD to trainingTraining as Code - Applying CI/CD to training
Training as Code - Applying CI/CD to trainingMark Waite
 
Docker and Jenkins [as code]
Docker and Jenkins [as code]Docker and Jenkins [as code]
Docker and Jenkins [as code]Mark Waite
 
Thinking about Jenkins Security
Thinking about Jenkins SecurityThinking about Jenkins Security
Thinking about Jenkins SecurityMark Waite
 
Lessons from Jenkins Platform Support
Lessons from Jenkins Platform SupportLessons from Jenkins Platform Support
Lessons from Jenkins Platform SupportMark Waite
 
Git for jenkins faster and better
Git for jenkins   faster and betterGit for jenkins   faster and better
Git for jenkins faster and betterMark Waite
 
Docker and Jenkins Pipeline
Docker and Jenkins PipelineDocker and Jenkins Pipeline
Docker and Jenkins PipelineMark Waite
 
Git in-the-large
Git in-the-largeGit in-the-large
Git in-the-largeMark Waite
 
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
Jenkins - Continuous Integration after Hudson, CruiseControl, and home builtJenkins - Continuous Integration after Hudson, CruiseControl, and home built
Jenkins - Continuous Integration after Hudson, CruiseControl, and home builtMark Waite
 
Jenkins For One
Jenkins For OneJenkins For One
Jenkins For OneMark Waite
 

Más de Mark Waite (9)

Training as Code - Applying CI/CD to training
Training as Code - Applying CI/CD to trainingTraining as Code - Applying CI/CD to training
Training as Code - Applying CI/CD to training
 
Docker and Jenkins [as code]
Docker and Jenkins [as code]Docker and Jenkins [as code]
Docker and Jenkins [as code]
 
Thinking about Jenkins Security
Thinking about Jenkins SecurityThinking about Jenkins Security
Thinking about Jenkins Security
 
Lessons from Jenkins Platform Support
Lessons from Jenkins Platform SupportLessons from Jenkins Platform Support
Lessons from Jenkins Platform Support
 
Git for jenkins faster and better
Git for jenkins   faster and betterGit for jenkins   faster and better
Git for jenkins faster and better
 
Docker and Jenkins Pipeline
Docker and Jenkins PipelineDocker and Jenkins Pipeline
Docker and Jenkins Pipeline
 
Git in-the-large
Git in-the-largeGit in-the-large
Git in-the-large
 
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
Jenkins - Continuous Integration after Hudson, CruiseControl, and home builtJenkins - Continuous Integration after Hudson, CruiseControl, and home built
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
 
Jenkins For One
Jenkins For OneJenkins For One
Jenkins For One
 

Último

Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 

Último (20)

Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 

To TDD or not to TDD - that is the question

  • 1. TO TDD OR NOT TO TDD – THAT IS THE QUESTION Test-driven development: lessons from the Jenkins Git Plugin Mark Waite 28 Feb 2018 Agile Boulder
  • 2. AN EXPERIENCE TALK • My biases • My mistakes • My misperceptions This is a biased talk. I’m using my experiences and some data Biased by professional experience • 2003 – Extreme Programming - manager Loved it and lived it for 4 years at a 200 person company • 2007 – Scrum - manager Lived it for 6 years at a 5000 person company • 2013 – More scrum - director Lived it for 3 years at a 10,000 person company • 2017 – Technical evangelist at CloudBees We sell and support Jenkins to Enterprises Biased by personal experience • 2012 – My first commit to Jenkins git plugin (Java) • 2014 – Wrote many tests for git plugin and git client plugin • 2015 – Primary maintainer of git plugin and git client plugin • 2017 – Divided maintainer – I do legacy, Stephen does next gen Biased by beliefs • I believe in Test Driven Development
  • 3. TEST-DRIVEN DEVELOPMENT • Red – write a small failing test • Green – write to pass the test • Refactor – simplify and improve Three simple steps A lifetime to learn to do it well I love tests. I write tests. I run tests. I fix tests. Photo CC BY-SA 4.0
  • 5. WHAT IS JENKINS? Leading continuous integration server Open source, started in 2007 as Hudson Became Jenkins in 2011 150,000+ installations worldwide 1,300+ plugins Active community Strong integrations
  • 6. WHAT IS GIT? Most popular version control system Linux kernel tracked in Git Microsoft Windows tracked in Git Core technology at GitHub, Bitbucket, VS Online, …
  • 7. JENKINS GIT PLUGIN HISTORY Jenkins Git Plugin connects Jenkins to Git Historical Phases of Jenkins Git Plugin • Early adoption: 2007 - 2010 • Significant growth: 2010 – 2013 • Refactoring: 2013 - 2016 • Pipeline: 2017 - now
  • 8. EARLY ADOPTION 2007 - 2010 Early adoption questions: • Is git relevant to Jenkins users? • Which git features matter most?
  • 9. EARLY ADOPTION Unknowns • User value • Feature relevance • Performance measures Integration Hurdles • Few lines of code • Few components used • Few components depend on us
  • 10. INSTALLS AND TESTS IN EARLY ADOPTION 0 20000 40000 60000 80000 100000 120000 140000 160000 Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18 Active Jenkins Git Plugin Installations 0 2000 4000 6000 8000 10000 12000 14000 Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18 Jenkins Git Plugin lines of code vs. test LOC LOC Test LOC • User needs are more important than tests • Discover user needs by delivering • Test interactively for fastest delivery
  • 11. WIDESPREAD USE 2010 - 2013 Widespread use questions: • Easier to use? • Easier to diagnose? • Next features?
  • 12. WIDESPREAD USE More confident • User value • Feature relevance • Key performance measure Integration Hurdles • More features • More lines of code • More components used • Few components depend on us
  • 13. INSTALLS AND TESTS IN WIDESPREAD USE 0 20000 40000 60000 80000 100000 120000 140000 160000 Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18 Active Jenkins Git Plugin Installations 0 2000 4000 6000 8000 10000 12000 14000 Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18 Jenkins Git Plugin lines of code vs. test LOC LOC Test LOC • User needs are more important than tests • Discover user needs by delivering • Test interactively for fastest delivery • Feature and dependency growth is increasing the cost of testing
  • 14. REFACTORING 2013 - 2016 Resolve implementation problems Git is winning the source control wars More regressions from refactoring Refactor: • add JGit • extract git client
  • 15. REFACTORING Confident in • User value • Feature relevance • Key performance measures Integration Hurdles • More features • More lines of code • More components used • Many components depend on us
  • 16. INSTALLS AND TESTS IN REFACTORING 0 20000 40000 60000 80000 100000 120000 140000 160000 Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18 Active Jenkins Git Plugin Installations 0 2000 4000 6000 8000 10000 12000 14000 Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18 Jenkins Git Plugin lines of code vs. test LOC LOC Test LOC • User needs are often failed by regressions • Discover user needs by delivering • Test automation for fastest delivery • Interactive testing still finds most bugs • Feature and dependency growth is increasing the cost of testing
  • 17. PIPELINE 2017 - NOW Pipeline: • GitHub, Bitbucket optimizations • Simpler setup and maintenance • Higher performance
  • 18. PIPELINE Significant new • User value • Features • Key performance improved Integration Hurdles • More features • More lines of code • More components used • Critical part of Jenkins
  • 19. INSTALLS AND TESTS IN PIPELINE 0 20000 40000 60000 80000 100000 120000 140000 160000 Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18 Active Jenkins Git Plugin Installations 0 2000 4000 6000 8000 10000 12000 14000 Jan-08 Jan-10 Jan-12 Jan-14 Jan-16 Jan-18 Jenkins Git Plugin lines of code vs. test LOC LOC Test LOC • Regressions are less frequent • Discover user needs by delivering • Test automation prevents many regressions • Interactive testing still finds most bugs • Feature and dependency growth is increasing the cost of testing
  • 20. WHEN CAN I SKIP TESTS? Tests are not as critical if: • Code will be discarded • Failures are easy to detect • Interactive testing is enough • Risk is low from broken code
  • 21. WHEN SHOULD I ADD TESTS? Tests are more critical if: • Code will live a long time • Failures are hard to detect • Interactive testing is not enough • Risk is high from broken code

Notas del editor

  1. This is an experience report. It is based on my biases, my errors, and my misperception. I share my history not because it is especially relevant to test driven development, but because it may help you understand some of the biases that are implicit in the talk. Most of my time with test driven development was as a manager watching teams practice it. I was the manager of a team that transitioned from waterfall to Extreme Programming in 2003. That team of 10-15 people went “all in” with Extreme Programming. We tore down the cubicle walls. We installed big white boards. We encouraged continuous integration and rigorous test driven development in the Java desktop application we created and released every 3 months. We worked that way for 4 years. It was fun. After those 4 years, in 2007 we were acquired by a larger company. The product was moved to India and we were assigned to a project writing SharePoint extensions in C#. I spent a few years managing SharePoint based development in C# with the same developers who had spent 4 years writing test driven the Java based desktop application. After we discovered that SharePoint was a poor choice for the tasks we were trying to accomplish, I was reassigned to manage the build team for a large database application written in Java. We didn’t write tests ourselves, but we ran the tests created by others. That lasted for a few years and provided new experiences, including running builds for hundreds of developers. After those 6 years, I joined a different company as a director in 2013. The team was creating a Java based replacement for a rule processing engine. We spent 3+ years bringing that Java based rule processing engine into multiple releases. More new experiences, and eventually an assignment to manage a team of C programmers in their work on a message bus. In 2017, I joined CloudBees as a technical evangelist. I now spend my time showing people how to do cool things with Jenkins. I think test driven development is great. I’ve been in organizations where we wrote very few automated tests and I’ve been in organizations where we wrote many, many automated tests. I prefer more automated tests and I prefer tests that are written while the code is being written. We created our own python based continuous integration server in 2003, then switched to Hudson in 2007 when it became available. Hudson became Jenkins in 2011. I submitted tests to the Jenkins git plugin in 2014 when I became frustrated at the regressions I was detecting in new releases. In 2015 I became the primary maintainer of the plugin. In 2017, Stephen Connolly became a maintainer and added some really great multi-branch Pipeline features which he maintains. My history is only relevant to you if it helps you understand my biases. I think test driven development is great. I think everyone should do it almost all the time. However, others don’t always think that way. In particular, the original developers of the Jenkins git plugin don’t work that way. This talk uses history to look at those places where a lack of automated tests, and a lack of test driven development can be good, helpful, and workable.
  2. This is a period of fast learning and experimentation. There is less code to break and fewer dependencies
  3. I’m a test driven development proponent. I love test driven development. Yet here we see adoption and delight with code that is definitely not test driven. For the first 18 months of the existence of the plugin, there are no tests. None. All verification is done interactively before a release. How were they so successful? Because users are more important than tests. Interactive testing at this stage is much faster than writing tests.