SlideShare a Scribd company logo
1 of 33
Download to read offline
Sunday, April 7, 13
testing!



                                 www.nedap.com
Sunday, April 7, 13
testing!
                         before production
                          not in production




                                          www.nedap.com
Sunday, April 7, 13
whoami

                      •   Daniele Sluijters
                      •   @daenney: irc, twitter, github, ...
                      •   mail: daniele.sluijters@nedap.com
                      •   XMPP / Jabber: ☝



                                                                www.nedap.com
Sunday, April 7, 13
www.nedap.com
© Ines Hegedus-Garcia | https://secure.flickr.com/photos/miamism/8446238376/
Sunday, April 7, 13
consequences

           exec	
  {	
  ‘first-­‐run-­‐reboot’:
           	
  	
  command	
  =>	
  ‘touch	
  /tmp/first-­‐run	
  
           	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  &&	
  reboot’,
           	
  	
  creates	
  =>	
  ‘/tmp/first-­‐run’,
           }


                                                                     www.nedap.com
Sunday, April 7, 13
avoid latest
                      class	
  mysql	
  {
                      	
  	
  package	
  {	
  ‘mysql-­‐server’:
                      	
  	
  	
  	
  ensure	
  =>	
  latest,
                      	
  	
  	
  	
  notify	
  =>	
  Service[‘mysql’],
                      	
  	
  }
                      }

                                                                  www.nedap.com
Sunday, April 7, 13
structure



                                  www.nedap.com
Sunday, April 7, 13
params
                 class	
  acme::params	
  {
                 	
  	
  case	
  $::osfamily	
  {
                 	
  	
  	
  	
  ‘Debian’:	
  {	
  $founder	
  =	
  ‘Marvin’	
  }
                 	
  	
  	
  	
  default:	
  {	
  fail(“No	
  can’t	
  do.”)	
  }
                 	
  	
  }
                 }

                                                                     www.nedap.com
Sunday, April 7, 13
params
                      class	
  acme::package	
  {	
  
                      	
  	
  package	
  {	
  ‘marvin’:
                      	
  	
  	
  	
  ensure	
  =>	
  $::acme::version,
                      	
  	
  }
                      	
  	
  ...
                      }

                                                                  www.nedap.com
Sunday, April 7, 13
configurable
                      class	
  acme(
                      	
  	
  $version	
  =	
  ‘1.6’,
                      	
  	
  $enable	
  =	
  true,
                      )	
  inherits	
  acme::params	
  {	
  
                      	
  	
  ...
                      }

                                                               www.nedap.com
Sunday, April 7, 13
users are crazy
                      class	
  acme(
                      	
  	
  $version	
  =	
  ‘1.6’,
                      	
  	
  $enable	
  =	
  true,
                      ){	
  
                      	
  	
  validate_string($version)
                      	
  	
  validate_bool($enable)
                      }

                                                          www.nedap.com
Sunday, April 7, 13
data sources

                      • Don’t couple modules to data
                      • Pass in data through params
                      • Use a profile to configure the module

                                                       www.nedap.com
Sunday, April 7, 13
profile
                      class	
  profile::acme	
  {
                      	
  	
  class	
  {	
  ‘acme’:
                      	
  	
  	
  	
  version	
  =>	
  hiera(‘version’)
                      	
  	
  	
  	
  ...
                      	
  	
  }
                      }

                                                                  www.nedap.com
Sunday, April 7, 13
misc


                      • Write docs
                      • Include a README + license


                                                      www.nedap.com
Sunday, April 7, 13
www.nedap.com
© elycefeliz | https://secure.flickr.com/photos/elycefeliz/4649829000/
Sunday, April 7, 13
www.nedap.com
© a200/a77Wells | https://secure.flickr.com/photos/aiwells/4672742619/
Sunday, April 7, 13
rspec-puppet



                                     www.nedap.com
Sunday, April 7, 13
setup
                      • Setup:
                       • use puppetlabs_spec_helper
                       • https://puppetlabs.com/blog/the-
                          next-generation-of-puppet-module-
                          testing/

                      • Read the tutorial:
                       • http://rspec-puppet.com/tutorial/
                                                        www.nedap.com
Sunday, April 7, 13
setup

                 source	
  :rubygems
                 gem	
  'puppet'	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  ,	
  '~>	
  3.1'
                 gem	
  'facter'	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  ,	
  '~>	
  1.6.18'
                 gem	
  'puppet-­‐lint'	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  ,	
  '~>	
  0.3.2'
                 gem	
  'puppetlabs_spec_helper'	
  ,	
  '~>	
  0.4.1'



                                                                                                           www.nedap.com
Sunday, April 7, 13
data

                • let	
  :params	
  do	
  {}	
  end
                • let	
  :facts	
  do	
  {}	
  end
                • let	
  :pre_condition	
  do	
  {}	
  end




                                                             www.nedap.com
Sunday, April 7, 13
matchers
                • should ⬌	
  should_not	
  
                • include_type
                • with_attr(‘value’)
                • ‘value2’})
                  with({:attr1	
  =>	
  ‘value1’,	
  :attr2	
  =>	
  


                • with_content(regex)
                                                          www.nedap.com
Sunday, April 7, 13
example
                      describe	
  'acme'	
  do
                      	
  	
  it	
  'should	
  declare	
  itself'	
  do
                      	
  	
  	
  	
  should	
  contain_class('acme')
                      	
  	
  end
                      end


                                                                     www.nedap.com
Sunday, April 7, 13
example
           context	
  ‘on	
  Debian’	
  do

           	
  	
  let	
  :facts	
  do	
  {	
  :osfamily	
  =>	
  ‘Debian’	
  }	
  end

           	
  	
  let	
  :params	
  do	
  {	
  :ver	
  =>	
  ‘1.2’	
  }	
  end

           	
  	
  it	
  ‘should	
  install	
  mysql’	
  do

           	
  	
  	
  	
  should	
  contain_package(‘mysql’).with_ensure(params[:ver]})

           	
  	
  end

           	
  	
  it	
  ‘should	
  not	
  install	
  redis’	
  do

           	
  	
  	
  	
  should_not	
  contain_package(‘redis’).with_ensure(‘present’)

           	
  	
  end

           end
                                                                                         www.nedap.com
Sunday, April 7, 13
success

                      module	
  git:master	
  ›❯	
  rake	
  spec
                      .............


                      Finished	
  in	
  2.43	
  seconds
                      13	
  examples,	
  0	
  failures


                                                               www.nedap.com
Sunday, April 7, 13
www.nedap.com
© Colin Fahrion | https://secure.flickr.com/photos/headlouse/1484615917/
Sunday, April 7, 13
automate

                      • Generate module structure
                       • init, install, config, services, params
                      • Generate tests
                      • Generate README
                      • CI
                                                           www.nedap.com
Sunday, April 7, 13
behaviour



                                  www.nedap.com
Sunday, April 7, 13
options

                      • Deploy to a testing environment
                      • Monitor your testing environment
                      • Test with rspec-...?

                                                           www.nedap.com
Sunday, April 7, 13
environment

                      • Jenkins + vagrant
                       • Can’t run on slaves
                       • Can’t run concurrent builds

                                                       www.nedap.com
Sunday, April 7, 13
monitoring

                      • Any tool you want to:
                       • nagios / icinga
                       • zabbix / zenoss / sensu
                       • ...

                                                   www.nedap.com
Sunday, April 7, 13
www.nedap.com
© Kristina Alexanderson | https://secure.flickr.com/photos/kalexanderson/5421517469/
Sunday, April 7, 13
q?



                           www.nedap.com
Sunday, April 7, 13

More Related Content

Similar to How and why you should test

Puppet and AWS: Getting the best of both worlds
Puppet and AWS: Getting the best of both worldsPuppet and AWS: Getting the best of both worlds
Puppet and AWS: Getting the best of both worldsPuppet
 
Silex: From nothing to an API
Silex: From nothing to an APISilex: From nothing to an API
Silex: From nothing to an APIchrisdkemper
 
Ruby 2.0 / Rails 4.0, A selection of new features.
Ruby 2.0 / Rails 4.0, A selection of new features.Ruby 2.0 / Rails 4.0, A selection of new features.
Ruby 2.0 / Rails 4.0, A selection of new features.lrdesign
 
Ember and containers
Ember and containersEmber and containers
Ember and containersMatthew Beale
 
Rspec group
Rspec groupRspec group
Rspec groupthefonso
 
spring3.2 java config Servler3
spring3.2 java config Servler3spring3.2 java config Servler3
spring3.2 java config Servler3YongHyuk Lee
 

Similar to How and why you should test (8)

Puppet and AWS: Getting the best of both worlds
Puppet and AWS: Getting the best of both worldsPuppet and AWS: Getting the best of both worlds
Puppet and AWS: Getting the best of both worlds
 
Silex: From nothing to an API
Silex: From nothing to an APISilex: From nothing to an API
Silex: From nothing to an API
 
Ruby 2.0 / Rails 4.0, A selection of new features.
Ruby 2.0 / Rails 4.0, A selection of new features.Ruby 2.0 / Rails 4.0, A selection of new features.
Ruby 2.0 / Rails 4.0, A selection of new features.
 
Ruby 20th birthday
Ruby 20th birthdayRuby 20th birthday
Ruby 20th birthday
 
Ember and containers
Ember and containersEmber and containers
Ember and containers
 
Rspec group
Rspec groupRspec group
Rspec group
 
Rails Intro & Tutorial
Rails Intro & TutorialRails Intro & Tutorial
Rails Intro & Tutorial
 
spring3.2 java config Servler3
spring3.2 java config Servler3spring3.2 java config Servler3
spring3.2 java config Servler3
 

More from Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyamlPuppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)Puppet
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscodePuppet
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twentiesPuppet
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codePuppet
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approachPuppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationPuppet
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliancePuppet
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowPuppet
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Puppet
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppetPuppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkPuppet
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping groundPuppet
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy SoftwarePuppet
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User GroupPuppet
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsPuppet
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyPuppet
 

More from Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Recently uploaded

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

How and why you should test

  • 2. testing! www.nedap.com Sunday, April 7, 13
  • 3. testing! before production not in production www.nedap.com Sunday, April 7, 13
  • 4. whoami • Daniele Sluijters • @daenney: irc, twitter, github, ... • mail: daniele.sluijters@nedap.com • XMPP / Jabber: ☝ www.nedap.com Sunday, April 7, 13
  • 5. www.nedap.com © Ines Hegedus-Garcia | https://secure.flickr.com/photos/miamism/8446238376/ Sunday, April 7, 13
  • 6. consequences exec  {  ‘first-­‐run-­‐reboot’:    command  =>  ‘touch  /tmp/first-­‐run                            &&  reboot’,    creates  =>  ‘/tmp/first-­‐run’, } www.nedap.com Sunday, April 7, 13
  • 7. avoid latest class  mysql  {    package  {  ‘mysql-­‐server’:        ensure  =>  latest,        notify  =>  Service[‘mysql’],    } } www.nedap.com Sunday, April 7, 13
  • 8. structure www.nedap.com Sunday, April 7, 13
  • 9. params class  acme::params  {    case  $::osfamily  {        ‘Debian’:  {  $founder  =  ‘Marvin’  }        default:  {  fail(“No  can’t  do.”)  }    } } www.nedap.com Sunday, April 7, 13
  • 10. params class  acme::package  {      package  {  ‘marvin’:        ensure  =>  $::acme::version,    }    ... } www.nedap.com Sunday, April 7, 13
  • 11. configurable class  acme(    $version  =  ‘1.6’,    $enable  =  true, )  inherits  acme::params  {      ... } www.nedap.com Sunday, April 7, 13
  • 12. users are crazy class  acme(    $version  =  ‘1.6’,    $enable  =  true, ){      validate_string($version)    validate_bool($enable) } www.nedap.com Sunday, April 7, 13
  • 13. data sources • Don’t couple modules to data • Pass in data through params • Use a profile to configure the module www.nedap.com Sunday, April 7, 13
  • 14. profile class  profile::acme  {    class  {  ‘acme’:        version  =>  hiera(‘version’)        ...    } } www.nedap.com Sunday, April 7, 13
  • 15. misc • Write docs • Include a README + license www.nedap.com Sunday, April 7, 13
  • 16. www.nedap.com © elycefeliz | https://secure.flickr.com/photos/elycefeliz/4649829000/ Sunday, April 7, 13
  • 17. www.nedap.com © a200/a77Wells | https://secure.flickr.com/photos/aiwells/4672742619/ Sunday, April 7, 13
  • 18. rspec-puppet www.nedap.com Sunday, April 7, 13
  • 19. setup • Setup: • use puppetlabs_spec_helper • https://puppetlabs.com/blog/the- next-generation-of-puppet-module- testing/ • Read the tutorial: • http://rspec-puppet.com/tutorial/ www.nedap.com Sunday, April 7, 13
  • 20. setup source  :rubygems gem  'puppet'                                  ,  '~>  3.1' gem  'facter'                                  ,  '~>  1.6.18' gem  'puppet-­‐lint'                        ,  '~>  0.3.2' gem  'puppetlabs_spec_helper'  ,  '~>  0.4.1' www.nedap.com Sunday, April 7, 13
  • 21. data • let  :params  do  {}  end • let  :facts  do  {}  end • let  :pre_condition  do  {}  end www.nedap.com Sunday, April 7, 13
  • 22. matchers • should ⬌  should_not   • include_type • with_attr(‘value’) • ‘value2’}) with({:attr1  =>  ‘value1’,  :attr2  =>   • with_content(regex) www.nedap.com Sunday, April 7, 13
  • 23. example describe  'acme'  do    it  'should  declare  itself'  do        should  contain_class('acme')    end end www.nedap.com Sunday, April 7, 13
  • 24. example context  ‘on  Debian’  do    let  :facts  do  {  :osfamily  =>  ‘Debian’  }  end    let  :params  do  {  :ver  =>  ‘1.2’  }  end    it  ‘should  install  mysql’  do        should  contain_package(‘mysql’).with_ensure(params[:ver]})    end    it  ‘should  not  install  redis’  do        should_not  contain_package(‘redis’).with_ensure(‘present’)    end end www.nedap.com Sunday, April 7, 13
  • 25. success module  git:master  ›❯  rake  spec ............. Finished  in  2.43  seconds 13  examples,  0  failures www.nedap.com Sunday, April 7, 13
  • 26. www.nedap.com © Colin Fahrion | https://secure.flickr.com/photos/headlouse/1484615917/ Sunday, April 7, 13
  • 27. automate • Generate module structure • init, install, config, services, params • Generate tests • Generate README • CI www.nedap.com Sunday, April 7, 13
  • 28. behaviour www.nedap.com Sunday, April 7, 13
  • 29. options • Deploy to a testing environment • Monitor your testing environment • Test with rspec-...? www.nedap.com Sunday, April 7, 13
  • 30. environment • Jenkins + vagrant • Can’t run on slaves • Can’t run concurrent builds www.nedap.com Sunday, April 7, 13
  • 31. monitoring • Any tool you want to: • nagios / icinga • zabbix / zenoss / sensu • ... www.nedap.com Sunday, April 7, 13
  • 32. www.nedap.com © Kristina Alexanderson | https://secure.flickr.com/photos/kalexanderson/5421517469/ Sunday, April 7, 13
  • 33. q? www.nedap.com Sunday, April 7, 13