Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Test Driven Development
and
Puppet
Jan & Johan
And We Are ? -> Johan
Open Source Consultant @ open-future
● Puppet addict ( and still learning ...)
● Member Belgian Pupp...
Why this talk ?

●

We want to do it the 'good' way -> TDD

●

rspec-puppet.com – rspec for modules

●

...

●

No docs fo...
What is Test Driven Development

Source http://centricconsulting.com/agile-test-driven-development/
Benefits of TDD
●

Test case from the beginning

●

Tests are maintained during life cycle

●

Small moves – coding just t...
TDD does not
●

Replace integration testing

●

Replace compliance testing

●

.......
TDD for a sysadmin
●

We have to learn developing

●

Huge mindshift

●

Culture schift

●

Rspec for modules is ok
–

●

...
Filling the gap ...
●
●

●

Initial attempt write Type using TDD
https://github.com/Open-Future-Belgium/pupp
et_rspec_demo...
A Simple TDD Type session
A Simple TDD Type Session - spec
A Simple TDD Session - test
A Simple TDD Session - code
A Simple TDD Session - test
A Simple TDD Session - rspec
A Simple TDD Session - test
A Simple TDD Session - rspec
A Simple TDD Session - Test
A Simple TDD Session - Code
A Simple TDD Session - test
A Simple TDD Session - rspec
A simple TDD Session - test
A Simple TDD session - code
A simple TDD Session
●

And we could go on ... forever
A simple TDD Session - rspec
A Simple TDD Session - test
A Simple TDD Session - code
A Simple TDD Session - test
Rspec books
More TDD
Test driven development_and_puppet-cfgmgmtcamp_eu-20140402
Test driven development_and_puppet-cfgmgmtcamp_eu-20140402
Test driven development_and_puppet-cfgmgmtcamp_eu-20140402
Upcoming SlideShare
Loading in …5
×

Test driven development_and_puppet-cfgmgmtcamp_eu-20140402

1,062 views

Published on

The slides of the talk i did on cfgmgmtcamp.eu, frebruary 4th 2014, looking at test driven development. This part is focused on the development of a custom puppet type

Published in: Technology, Business

Test driven development_and_puppet-cfgmgmtcamp_eu-20140402

  1. 1. Test Driven Development and Puppet Jan & Johan
  2. 2. And We Are ? -> Johan Open Source Consultant @ open-future ● Puppet addict ( and still learning ...) ● Member Belgian Puppet User Group ● A Sys-Admin ● A very poor developer (but working on it) ● ● Convinced that (automated) testing is important ● Email: johan@open-future.be
  3. 3. Why this talk ? ● We want to do it the 'good' way -> TDD ● rspec-puppet.com – rspec for modules ● ... ● No docs found, any pointers ? ● Looking at the puppet code to learn
  4. 4. What is Test Driven Development Source http://centricconsulting.com/agile-test-driven-development/
  5. 5. Benefits of TDD ● Test case from the beginning ● Tests are maintained during life cycle ● Small moves – coding just to pass test ● Encourage simple design ● First step in test automation
  6. 6. TDD does not ● Replace integration testing ● Replace compliance testing ● .......
  7. 7. TDD for a sysadmin ● We have to learn developing ● Huge mindshift ● Culture schift ● Rspec for modules is ok – ● Writing modules is already adopted by sysadmin see Rspec-puppet.com => tutorial Rspec for type/providers – Still looking for docs – Use the (puppet) source
  8. 8. Filling the gap ... ● ● ● Initial attempt write Type using TDD https://github.com/Open-Future-Belgium/pupp et_rspec_demo In need of help (i'm kind of stuck) ● Looking for input how to do it right ● Hopefully it results in a good tutorial ● ....
  9. 9. A Simple TDD Type session
  10. 10. A Simple TDD Type Session - spec
  11. 11. A Simple TDD Session - test
  12. 12. A Simple TDD Session - code
  13. 13. A Simple TDD Session - test
  14. 14. A Simple TDD Session - rspec
  15. 15. A Simple TDD Session - test
  16. 16. A Simple TDD Session - rspec
  17. 17. A Simple TDD Session - Test
  18. 18. A Simple TDD Session - Code
  19. 19. A Simple TDD Session - test
  20. 20. A Simple TDD Session - rspec
  21. 21. A simple TDD Session - test
  22. 22. A Simple TDD session - code
  23. 23. A simple TDD Session ● And we could go on ... forever
  24. 24. A simple TDD Session - rspec
  25. 25. A Simple TDD Session - test
  26. 26. A Simple TDD Session - code
  27. 27. A Simple TDD Session - test
  28. 28. Rspec books
  29. 29. More TDD

×