SlideShare a Scribd company logo
Garrett Honeycutt 
gh@learnpuppet.com 
learnpuppet.com 
@learnpuppet 
Garrett Honeycutt 
gh@learnpuppet.com 
learnpuppet.com 
@learnpuppet
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
TDD?
Why Test?
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
DEVELOPERS! 
DEVELOPERS! 
DEVELOPERS! 
DEVELOPERS! 
DEVELOPERS! 
DEVELOPERS! 
DEVELOPERS! 
DEVELOPERS! 
DEVELOPERS! 
DEVELOPERS!
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
Why Test 
First?
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
What to 
Test?
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
Tooling
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
require 'spec_helper' 
! 
describe package('httpd') do 
it { should be_installed } 
end 
! 
describe service('httpd') do 
it { should be_enabled } 
it { should be_running } 
end 
! 
describe port(80) do 
it { should be_listening } 
end
$ rake spec 
! 
Package "httpd" 
should be installed 
! 
Service "httpd" 
should be enabled 
should be running 
! 
Port "80" 
should be listening 
! 
4 examples, 0 failures
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
Monitoring
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
$ ping -c1 example.com 
PING example.com (93.184.216.119): 56 
data bytes 
64 bytes from 93.184.216.119: icmp_seq=0 
ttl=58 time=4.947 ms 
! 
--- example.com ping statistics --- 
1 packets transmitted, 1 packets 
received, 0.0% packet loss 
round-trip min/avg/max/stddev = 
4.947/4.947/4.947/0.000 ms
$ curl example.com -I 
HTTP/1.1 200 OK 
Accept-Ranges: bytes 
Cache-Control: max-age=604800 
Content-Type: text/html 
Date: Thu, 13 Nov 2014 03:52:15 GMT 
Etag: "359670651" 
Expires: Thu, 20 Nov 2014 03:52:15 GMT 
Last-Modified: Fri, 09 Aug 2013 23:54:35 
GMT 
Server: ECS (pae/3796) 
X-Cache: HIT 
x-ec-custom-error: 1 
Content-Length: 1270
2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14
write tests 
(which fail)
just enough 
code to pass
refactor
Garrett Honeycutt 
gh@learnpuppet.com 
learnpuppet.com 
@learnpuppet

More Related Content

DOC
Modul dasa rq
PDF
20150314 - Functional Testing for Configuration Management @ Cascadia IT Con...
PDF
20150613 self-puppet v4-avoiding_dragons
KEY
Puppet
PDF
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
PDF
(2016-06-11) Packer: Make Multi-Platform Images
PDF
Test Driven Development with Puppet
ZIP
Automated Frontend Testing
Modul dasa rq
20150314 - Functional Testing for Configuration Management @ Cascadia IT Con...
20150613 self-puppet v4-avoiding_dragons
Puppet
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
(2016-06-11) Packer: Make Multi-Platform Images
Test Driven Development with Puppet
Automated Frontend Testing

Similar to 2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14 (20)

PDF
20140406 loa days-tdd-with_puppet_tutorial
PDF
Puppet Module Reusability - What I Learned from Shipping to the Forge
PPTX
Introduction to Unit Testing
PDF
Test Driven Development with Puppet - PuppetConf 2014
PDF
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
PPTX
Grokking Grok: Monitorama PDX 2015
KEY
Puppet for dummies - PHPBenelux UG edition
PPT
Automated Unit Testing
PDF
Javascript TDD with Jasmine, Karma, and Gulp
PDF
Howto Test A Patch And Make A Difference!
PPTX
Reducing Bugs With Static Code Analysis php tek 2025
PDF
Developer Tests - Things to Know
ODP
YAPC::NA 2007 - Customizing And Extending Perl Critic
PDF
Testing and validating spark programs - Strata SJ 2016
PDF
How to test code with mruby
PDF
Test driven infrastructure
PDF
Tech talks annual 2015 kirk pepperdine_ripping apart java 8 streams
ZIP
Test
PDF
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
20140406 loa days-tdd-with_puppet_tutorial
Puppet Module Reusability - What I Learned from Shipping to the Forge
Introduction to Unit Testing
Test Driven Development with Puppet - PuppetConf 2014
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
Grokking Grok: Monitorama PDX 2015
Puppet for dummies - PHPBenelux UG edition
Automated Unit Testing
Javascript TDD with Jasmine, Karma, and Gulp
Howto Test A Patch And Make A Difference!
Reducing Bugs With Static Code Analysis php tek 2025
Developer Tests - Things to Know
YAPC::NA 2007 - Customizing And Extending Perl Critic
Testing and validating spark programs - Strata SJ 2016
How to test code with mruby
Test driven infrastructure
Tech talks annual 2015 kirk pepperdine_ripping apart java 8 streams
Test
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
Ad

More from garrett honeycutt (11)

PDF
20180823 - Sensu + Puppet
PDF
Continuous Deployment Pipeline for Systems - Presented at Ohio LinuxFest 2017...
PDF
Continuous Deployment Pipeline for Systems at Cascadia IT Conference - 2017-0...
PDF
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
PDF
20130407 load puppevtv3-and_hiera
KEY
20120331 - Expanded Intro to Puppet for LOAD
PDF
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
PDF
20110611 expanded intro-to_puppet_for_self
KEY
20100425 Configuration Management With Puppet Lfnw
PDF
Fighting Spam With A Perimeter Mail System 20071108 Sasag
PDF
20090514 Introducing Puppet To Sasag
20180823 - Sensu + Puppet
Continuous Deployment Pipeline for Systems - Presented at Ohio LinuxFest 2017...
Continuous Deployment Pipeline for Systems at Cascadia IT Conference - 2017-0...
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
20130407 load puppevtv3-and_hiera
20120331 - Expanded Intro to Puppet for LOAD
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20110611 expanded intro-to_puppet_for_self
20100425 Configuration Management With Puppet Lfnw
Fighting Spam With A Perimeter Mail System 20071108 Sasag
20090514 Introducing Puppet To Sasag
Ad

Recently uploaded (20)

PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Lecture Notes Electrical Wiring System Components
PPT
introduction to datamining and warehousing
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Artificial Intelligence
PPTX
Sustainable Sites - Green Building Construction
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Well-logging-methods_new................
PPT
Project quality management in manufacturing
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Safety Seminar civil to be ensured for safe working.
Internet of Things (IOT) - A guide to understanding
Lecture Notes Electrical Wiring System Components
introduction to datamining and warehousing
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems
Artificial Intelligence
Sustainable Sites - Green Building Construction
CYBER-CRIMES AND SECURITY A guide to understanding
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
Foundation to blockchain - A guide to Blockchain Tech
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Automation-in-Manufacturing-Chapter-Introduction.pdf
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Well-logging-methods_new................
Project quality management in manufacturing
Mitigating Risks through Effective Management for Enhancing Organizational Pe...

2014-11-14 - Why Test Driven Development (TDD) Works for Sysadmins @ LISA14

  • 1. Garrett Honeycutt gh@learnpuppet.com learnpuppet.com @learnpuppet Garrett Honeycutt gh@learnpuppet.com learnpuppet.com @learnpuppet
  • 8. DEVELOPERS! DEVELOPERS! DEVELOPERS! DEVELOPERS! DEVELOPERS! DEVELOPERS! DEVELOPERS! DEVELOPERS! DEVELOPERS! DEVELOPERS!
  • 38. require 'spec_helper' ! describe package('httpd') do it { should be_installed } end ! describe service('httpd') do it { should be_enabled } it { should be_running } end ! describe port(80) do it { should be_listening } end
  • 39. $ rake spec ! Package "httpd" should be installed ! Service "httpd" should be enabled should be running ! Port "80" should be listening ! 4 examples, 0 failures
  • 45. $ ping -c1 example.com PING example.com (93.184.216.119): 56 data bytes 64 bytes from 93.184.216.119: icmp_seq=0 ttl=58 time=4.947 ms ! --- example.com ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 4.947/4.947/4.947/0.000 ms
  • 46. $ curl example.com -I HTTP/1.1 200 OK Accept-Ranges: bytes Cache-Control: max-age=604800 Content-Type: text/html Date: Thu, 13 Nov 2014 03:52:15 GMT Etag: "359670651" Expires: Thu, 20 Nov 2014 03:52:15 GMT Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT Server: ECS (pae/3796) X-Cache: HIT x-ec-custom-error: 1 Content-Length: 1270
  • 49. just enough code to pass
  • 51. Garrett Honeycutt gh@learnpuppet.com learnpuppet.com @learnpuppet