Behaviour driven infrastructure
-
Upload
lindsay-holmwood -
Category
Technology
-
view
3.743 -
download
0
description
Transcript of Behaviour driven infrastructure
![Page 1: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/1.jpg)
BehaviourDriven
InfrastructureLindsay Holmwood
![Page 2: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/2.jpg)
DevOps
![Page 3: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/3.jpg)
Behaviour Driven
Development
![Page 4: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/4.jpg)
Behaviour Driven
Infrastructure?
![Page 5: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/5.jpg)
What is a behavioural test?
![Page 6: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/6.jpg)
origins
![Page 7: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/7.jpg)
Test Driven Development
![Page 8: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/8.jpg)
write test
![Page 9: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/9.jpg)
write testrun test
![Page 10: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/10.jpg)
write testrun test
test fails
![Page 11: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/11.jpg)
write testrun test
test fails
make test pass
![Page 12: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/12.jpg)
write testrun test
test fails
make test pass
refactor
![Page 13: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/13.jpg)
unit tests
![Page 14: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/14.jpg)
input/outputof
functions
![Page 15: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/15.jpg)
result = bar(foo)assert(result, true)
![Page 16: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/16.jpg)
xUnit
![Page 17: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/17.jpg)
![Page 18: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/18.jpg)
a reaction to test focus
Behavior Driven Development
![Page 19: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/19.jpg)
testing the
flow of data in a system
testing the
flow of data in a system
![Page 20: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/20.jpg)
test auser canperform atask
![Page 21: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/21.jpg)
make a donationsearch for productcheckout cart
![Page 22: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/22.jpg)
verifying a business’sfunctional
requirementsare met
![Page 23: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/23.jpg)
underlying
implementation isirrelevant
to the business
underlying
implementation isirrelevant
to the business
![Page 24: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/24.jpg)
Business: “assert(bar(foo),true)?”Tech: “Yes”Business: “Great”
![Page 25: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/25.jpg)
Business: “assert(bar(foo),true)?”Tech: “Yes”Business: “Great”
![Page 26: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/26.jpg)
Business: “Can I search for things?”Tech: “Yes”Business: “Great”
![Page 27: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/27.jpg)
functionis importantfunctionis important
![Page 28: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/28.jpg)
implementationis not
implementationis not
![Page 29: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/29.jpg)
![Page 30: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/30.jpg)
verifying a business’sfunctional
requirementsare met
![Page 31: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/31.jpg)
integration testsacceptance testsintegration testsacceptance tests
![Page 32: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/32.jpg)
“outside-in tests”“outside-in tests”
![Page 33: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/33.jpg)
executable specificationexecutable specification
![Page 34: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/34.jpg)
written in
spoken languagewritten in
spoken language
![Page 35: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/35.jpg)
so the business understands what it is
paying for
so the business understands what it is
paying for
![Page 36: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/36.jpg)
![Page 37: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/37.jpg)
Enough business touchy-feely mumbo
jumbo!
![Page 38: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/38.jpg)
I thought this was a
Behaviour Driven
Infrastructure talk?
![Page 39: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/39.jpg)
I thought this was a
Behaviour Driven
Infrastructure talk?
![Page 40: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/40.jpg)
![Page 41: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/41.jpg)
Infrastructure as code
![Page 42: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/42.jpg)
“The ‘Infrastructure’ is an application, a long running process with inputs, outputs and state.”
- Andrew Schafer, 2009http://bit.ly/he3HBt
![Page 43: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/43.jpg)
an abstractionan abstraction
![Page 44: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/44.jpg)
infrastructureis the
application
![Page 45: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/45.jpg)
daemonsare the
libraries
![Page 46: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/46.jpg)
configuration managementis the
programming language
![Page 47: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/47.jpg)
infrastructureis
built with code
![Page 48: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/48.jpg)
code without testsis
bad
![Page 49: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/49.jpg)
code without testsis
evilevil
![Page 50: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/50.jpg)
Why?
![Page 51: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/51.jpg)
You can’t verify that your system works.
![Page 52: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/52.jpg)
![Page 53: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/53.jpg)
Behaviour Driven
Infrastructure
![Page 54: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/54.jpg)
Taking BDD
principals & tools
Taking BDD
principals & tools
![Page 55: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/55.jpg)
Adapting them to
infrastructure development
![Page 56: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/56.jpg)
![Page 57: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/57.jpg)
Show me the
tools!
![Page 58: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/58.jpg)
Cucumber
![Page 59: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/59.jpg)
Executable format for software specifications
![Page 60: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/60.jpg)
Tool to execute that specification
![Page 61: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/61.jpg)
![Page 62: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/62.jpg)
Terminology
![Page 63: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/63.jpg)
featureis a
module of common functionality
![Page 64: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/64.jpg)
Feature: Google search To increase her knowledge A user Needs a search interface To discover information
![Page 65: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/65.jpg)
featurehas many
scenarios
![Page 66: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/66.jpg)
Feature: Google search To increase her knowledge A user Needs a search interface To discover information
Scenario: Home page When I visit "http://google.com.au/" And I fill in "q" with "great balls of fire" Then I should see "great balls of fire"
![Page 67: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/67.jpg)
scenariohas many
steps
![Page 68: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/68.jpg)
Given
![Page 69: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/69.jpg)
When
![Page 70: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/70.jpg)
Then
![Page 71: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/71.jpg)
And*
![Page 72: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/72.jpg)
![Page 73: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/73.jpg)
stepsare like
unit tests
![Page 74: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/74.jpg)
they mapto
blocks of code
![Page 75: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/75.jpg)
Feature: Google search To increase her knowledge A user Needs a search interface To discover information
Scenario: Home page When I visit "http://google.com.au/" And I fill in "q" with "great balls of fire" Then I should see "great balls of fire"
![Page 76: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/76.jpg)
When /^I visit "([^"]*)"$/ do |location| # codeend
When /^I fill in "([^"]*)" with "([^"]*)"$/ do |input, value| # codeend
Then /^I should see "([^"]*)"$/ do |string| # codeend
![Page 77: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/77.jpg)
When /^I visit "([^"]*)"$/ do |location| visit(location)end
When /^I fill in "([^"]*)" with "([^"]*)"$/ do |input, value| fill_in(input, :with => value)end
Then /^I should see "([^"]*)"$/ do |string| response.body.should match(string)end
![Page 78: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/78.jpg)
blocks of codeare like
unit tests
![Page 79: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/79.jpg)
∴ scenariois a
serial execution of unit tests
![Page 80: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/80.jpg)
![Page 81: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/81.jpg)
Installing
![Page 82: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/82.jpg)
$ apt-get install rubygems $ gem install cucumber
![Page 83: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/83.jpg)
Using
![Page 84: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/84.jpg)
$ apt-get install rubygems $ gem install cucumber
![Page 85: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/85.jpg)
$ apt-get install rubygems $ gem install cucumber$ mkdir -p project/features/steps$ cd project
![Page 86: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/86.jpg)
Testing Workflow
![Page 87: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/87.jpg)
write test
![Page 88: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/88.jpg)
write testrun test
![Page 89: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/89.jpg)
write testrun test
test fails
![Page 90: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/90.jpg)
write testrun test
test fails
make test pass
![Page 91: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/91.jpg)
write testrun test
test fails
make test pass
refactor
![Page 92: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/92.jpg)
$ apt-get install rubygems $ gem install cucumber$ mkdir -p project/features/steps$ cd project$ vim features/site.feature
![Page 93: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/93.jpg)
Feature: Google search To increase her knowledge A user Needs a search interface To discover information
Scenario: Home page When I visit "http://google.com.au/" And I fill in "q" with "great balls of fire" Then I should see "great balls of fire"
![Page 94: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/94.jpg)
$ apt-get install rubygems $ gem install cucumber$ mkdir -p project/features/steps$ cd project$ vim features/site.feature$ cucumber features/site.feature$ vim features/steps/site_steps.rb
![Page 95: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/95.jpg)
$ apt-get install rubygems $ gem install cucumber$ mkdir -p project/features/steps$ cd project$ vim features/site.feature$ cucumber features/site.feature$ vim features/steps/site_steps.rb$ cucumber features/site.feature
![Page 96: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/96.jpg)
![Page 97: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/97.jpg)
Implications
![Page 98: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/98.jpg)
Continuous Integration
![Page 99: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/99.jpg)
Test server builds
![Page 100: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/100.jpg)
Execute tests
on commit to config management
![Page 101: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/101.jpg)
What environments are the tests run against?
![Page 102: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/102.jpg)
UAT?
Staging?Production?
![Page 103: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/103.jpg)
Destructive tests?
![Page 104: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/104.jpg)
Fixtures
![Page 105: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/105.jpg)
Setup / TeardownPattern
![Page 106: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/106.jpg)
A/B testing
![Page 107: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/107.jpg)
![Page 108: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/108.jpg)
Migration to config management
![Page 109: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/109.jpg)
![Page 110: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/110.jpg)
Continuous Integration&
Monitoring Systems
![Page 111: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/111.jpg)
build
testnotify
deploy
![Page 112: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/112.jpg)
build
testnotify
deploy
![Page 113: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/113.jpg)
testnotify
![Page 114: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/114.jpg)
We’ve been asking the wrong questions
![Page 115: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/115.jpg)
pingconnect
![Page 116: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/116.jpg)
is the host up?is the service available?
![Page 117: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/117.jpg)
is the host up?is the service available?
misconfiguration, bugs triggered by user data, hacked
network stack up
but otherwise broken
![Page 118: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/118.jpg)
![Page 119: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/119.jpg)
Why should I care?
![Page 120: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/120.jpg)
“Nagios checks already do this!”
![Page 121: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/121.jpg)
Cucumber
provides a framework
to phrase questions
![Page 122: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/122.jpg)
Given
![Page 123: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/123.jpg)
When
![Page 124: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/124.jpg)
Then
![Page 125: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/125.jpg)
Lowers the barrier of entry to
writing good checks
![Page 126: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/126.jpg)
Caveat:
You need a firm grasp of language
![Page 127: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/127.jpg)
Feature: Candy Store Wooooooooo!
Scenario: Lollipops When I fly to the moon Then I should see monkeys
![Page 128: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/128.jpg)
Feature: Candy Store Wooooooooo!
Scenario: Lollipops When I fly to the moon Then I should see monkeys
completely valid,
completely useless
![Page 129: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/129.jpg)
![Page 130: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/130.jpg)
Cucumber
provides a common
specification format
dev & ops can share
![Page 131: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/131.jpg)
Cucumber
provides a common
specification format
IT & business can share
![Page 132: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/132.jpg)
Duplication of tests
![Page 133: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/133.jpg)
Development
![Page 134: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/134.jpg)
Production
![Page 135: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/135.jpg)
Cucumber featuresare librarised tests
Cucumber featuresare librarised tests
![Page 136: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/136.jpg)
Same specificationSame specification
![Page 137: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/137.jpg)
Different implementationDifferent implementation
![Page 138: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/138.jpg)
![Page 139: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/139.jpg)
Where to from here?
![Page 140: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/140.jpg)
Write more code.
![Page 141: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/141.jpg)
Patterns.
![Page 142: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/142.jpg)
Expand the library of tests.
![Page 143: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/143.jpg)
Explain to your friends, colleagues, family, pets
these ideas.
![Page 144: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/144.jpg)
Discuss!Thank you.
![Page 145: Behaviour driven infrastructure](https://reader034.fdocuments.net/reader034/viewer/2022051513/54639771b1af9fc4588b4593/html5/thumbnails/145.jpg)
http://www.flickr.com/photos/51746218@N03/5077975818/http://www.flickr.com/photos/abrinsky/4981594203/http://www.flickr.com/photos/andresrueda/3020304543/http://www.flickr.com/photos/communityfriend/2342578485/http://www.flickr.com/photos/damienroue/2775342201/http://www.flickr.com/photos/elsie/3917813380/http://www.flickr.com/photos/hugo90/5343453489/http://www.flickr.com/photos/iamphejom/4930805430/http://www.flickr.com/photos/jiuck/5060618037/http://www.flickr.com/photos/kusamakura/2435343128/http://www.flickr.com/photos/laurelfan/100700370/http://www.flickr.com/photos/littledebbie11/3208631777/http://www.flickr.com/photos/master-blitzy/1192778834/http://www.flickr.com/photos/nasacommons/4858567480/http://www.flickr.com/photos/nhankamer/4703022414/http://www.flickr.com/photos/normanlowery/4674154988/http://www.flickr.com/photos/paul_lowry/2266388742/http://www.flickr.com/photos/pinprick/467320431/http://www.flickr.com/photos/superciliousness/91346618/http://www.flickr.com/photos/xaviergp/4003730145/
Credits