Behavior Driven Infrastructure      Jeffrey Hulten   Automated Labs, LLC
Hearing it here, first!
Who Am I?
Behavior Driven?
BDD
Cucumber & rSpec
Infrastructure as Code
Where are the tests?
Behavior Driven Infrastructure
What do we need?cucumber          => "~> 0.9.2"net-ssh           => "~> 2.0.23"webrat            => "~> 0.7.1"rspec       ...
Learn Gherkin!    GIVEN    WHEN    THEN
Given...PrerequisitesNot required in a scenario“Given the user ‘tom’ exists”
When...Action to take“When I look at the directory ‘/home/tom’”
Then...Results to expect“Then it should be owned by ‘tom’”
And...Just like the one above“Then it should be owned by ‘tom’”“And it should be mode 0755”
ScenarioGiven the user ‘tom’ existsWhen I look at the directory ‘/home/tom’Then it should be owned by ‘tom’And it should b...
That’s not Ruby!Scenarios are in EnglishStep Definitions are in Ruby
Step DefinitionsWhen /^I look at the directory ([^]*)$/ do |arg1|      @filename = arg1endThen /^it should be owned by "([^...
Demo
Thanks!          Jeffrey Hulten    jeffh@automatedlabs.com     http://automatedlabs.comFeedback @ http://spkr8.com/t/5475
Upcoming SlideShare
Loading in...5
×

Behavior Driven Infrastructure 2011-01

904

Published on

My presentation to Ruby Users of Minnesota in January of 2011. This is an early version of this talk.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
904
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Behavior Driven Infrastructure 2011-01

    1. 1. Behavior Driven Infrastructure Jeffrey Hulten Automated Labs, LLC
    2. 2. Hearing it here, first!
    3. 3. Who Am I?
    4. 4. Behavior Driven?
    5. 5. BDD
    6. 6. Cucumber & rSpec
    7. 7. Infrastructure as Code
    8. 8. Where are the tests?
    9. 9. Behavior Driven Infrastructure
    10. 10. What do we need?cucumber => "~> 0.9.2"net-ssh => "~> 2.0.23"webrat => "~> 0.7.1"rspec => "~> 2.0.0"cucumber-nagios => "~> 0.7.6"
    11. 11. Learn Gherkin! GIVEN WHEN THEN
    12. 12. Given...PrerequisitesNot required in a scenario“Given the user ‘tom’ exists”
    13. 13. When...Action to take“When I look at the directory ‘/home/tom’”
    14. 14. Then...Results to expect“Then it should be owned by ‘tom’”
    15. 15. And...Just like the one above“Then it should be owned by ‘tom’”“And it should be mode 0755”
    16. 16. ScenarioGiven the user ‘tom’ existsWhen I look at the directory ‘/home/tom’Then it should be owned by ‘tom’And it should be mode 0755
    17. 17. That’s not Ruby!Scenarios are in EnglishStep Definitions are in Ruby
    18. 18. Step DefinitionsWhen /^I look at the directory ([^]*)$/ do |arg1| @filename = arg1endThen /^it should be owned by "([^"]*)"$/ do |arg1| ...end
    19. 19. Demo
    20. 20. Thanks! Jeffrey Hulten jeffh@automatedlabs.com http://automatedlabs.comFeedback @ http://spkr8.com/t/5475
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×