SlideShare a Scribd company logo
Continuous Testing
Eric Hogue
@ehogue
erichogue.ca

TrueNorth <?PHP?> Uncon
November 9, 2013
Cont
inuo
us
Test
ing
How
Dis
I
cov
ere
d it

Photo: Morten Diesen
http://www.flickr.com/photos/mortendiesen/8091682612
DD
T

Photo: William Warby
http://www.flickr.com/photos/wwarby/2460655511
Photo: ser... ser...
http://www.flickr.com/photos/el_ser_lomo/3267627038
Au
to
Au ma
to te
m
Te at the
sts ed

Photo: Markus
http://www.flickr.com/photos/tschiae/9758986651/
ed
Fe

ck
ba
Photo: Jeffrey Beall
http://www.flickr.com/photos/denverjeffrey/5133538450/
G

rd
ua
lu
P

ns
gi
Guard::PHPUnit2
Installation
Installation
Gemfile
source 'https://rubygems.org'
group :development do
gem 'guard'
gem 'guard-phpunit2'
end
Installation
Gemfile
source 'https://rubygems.org'
group :development do
gem 'guard'
gem 'guard-phpunit2'
end
$ bundle install
$ bundle exec guard
$ bundle exec guard
Guardfile
guard 'phpunit2', :cli => '--colors' do
watch(%r{^.+Test.php$})
end
Continuous Testing
guard 'phpunit2', :cli => '--colors' do
watch(%r{^tests/.+Test.php$})
watch(%r{^src/(.+).php$}) { |m|
"tests/#{m[1]}Test.php"
}
end
%r{^src/(.+).php$}
src/TDD/Factorial.php
%r{^src/(.+).php$}
src/TDD/Factorial.php

"tests/#{m[1]}Test.php"
phpunit tests/TDD/FactorialTest.php
Photo: Luis Humberto Molinar Márquez
http://www.flickr.com/photos/anktsunamunh/3271371910/

gs
tin
et
S
:all_on_start => true
:all_after_pass => true
:keep_failed => true
Continuous Testing
Guard::PHPCS
Gemfile
gem 'guard-phpcs'
Guardfile
guard 'phpcs', :standard => 'PSR2' do
watch(%r{.*.php$})
end
Continuous Testing
Guard::PHPMD
Gemfile
gem 'guard-phpmd'
Guardfile
guard 'phpmd' do
watch(%r{.*.php$})
end
Continuous Testing
Guard::Shell
Gemfile
gem 'guard-shell'
Guardfile
guard 'shell' do
watch(%r{^.+.php$}) {|m|
`php -l #{m[0]}`
true
}
end
Guard::Shell
Ot
Gu her
ar
ds
Inline Guard
module ::Guard
class Behat < Guard
end
end
def start
puts 'Run all Behat tests'
puts `bin/behat --format progress`
end
def run_on_change(paths)
paths.each do |file|
puts "Running behat on #{file}"
puts `bin/behat #{file} --format
progress`
end
end
guard 'behat' do
watch %r{^features/.+.feature$}
end
Continuous Testing
Continuous Testing
s
n

io
t
a
c

fi
ti

Photo: Ben Schumin
http://www.flickr.com/photos/schuminweb/9806474636/

o
N
Libnotify/Growl
Gemfile
gem 'libnotify'
Guardfile
# Linux
notification :libnotify
# Mac
notification :growl
Continuous Testing
Console Title
notification :terminal_title
Console Title
notification :terminal_title
tmux
notification :tmux,
:default_message_format => '%s >> %s',
:line_separator => ' > ',
:color_location => 'status-left-bg'
notification :off
G

rd
ua
Questions
Comments:
https://joind.in/10013
Twitter:
@ehogue
Blog:
http://erichogue.ca/
Damián Navas
http://www.flickr.com/photos/wingedwolf/5471047557/

More Related Content

PPT
Oow08slides
PPT
Owen wallace week two
PPT
Presentación1
PPT
Evernote - Taking Notes
PPTX
Manuel deangelo visual_resumestoryboard
PDF
Theory of Multiple Intelligences
PDF
Theory of Multiple Intelligences
PPT
Dark Ages 2.0
Oow08slides
Owen wallace week two
Presentación1
Evernote - Taking Notes
Manuel deangelo visual_resumestoryboard
Theory of Multiple Intelligences
Theory of Multiple Intelligences
Dark Ages 2.0

What's hot (20)

PDF
A glimpse into the future of higher education
PPTX
Lit Final Presentation
PDF
On Compelling Storytelling
PPT
Tech integration pk 1
PDF
Firefox小技巧-快速看圖
PPT
Online Film Distribution
PDF
What is a PhotoCamp?
PPTX
Shots and Angles
PPT
Our students won_t_research_the_way_we_did
PDF
Growing Grails Software, Driven by Domain
ODP
Perceptive media for #CanvasConf
DOCX
Presentation notes and references
PPTX
How to not hate your job
PPTX
Ibarra francisco industry_speech_slides
PDF
Simon david 4.4_finalppp_slideshow
PPT
Avoiding Traps in Projects
PDF
Listening To Each Other
PDF
7 Facts Every Author Ought To Know
PPT
What do a leaky roof, a greasy spoon, a bear sighting, and a man with a torto...
PDF
Creating Compelling Digital Stories
A glimpse into the future of higher education
Lit Final Presentation
On Compelling Storytelling
Tech integration pk 1
Firefox小技巧-快速看圖
Online Film Distribution
What is a PhotoCamp?
Shots and Angles
Our students won_t_research_the_way_we_did
Growing Grails Software, Driven by Domain
Perceptive media for #CanvasConf
Presentation notes and references
How to not hate your job
Ibarra francisco industry_speech_slides
Simon david 4.4_finalppp_slideshow
Avoiding Traps in Projects
Listening To Each Other
7 Facts Every Author Ought To Know
What do a leaky roof, a greasy spoon, a bear sighting, and a man with a torto...
Creating Compelling Digital Stories
Ad

Similar to Continuous Testing (20)

PPTX
ALA Preconference Making it Stick
PDF
How to mobilize followers
PDF
Knowing God
PPTX
Building your Personal Brand
PDF
Connectivist PD
PDF
Social Business: Be Social, Don't Use Social
PPT
The challenge
PDF
Leading Through Change: Inspiring Awakening
PDF
Success Factors of the Connected Home - Applications
PDF
Secrets Of An Impromptu
PPT
Oow 2008 Final
PDF
The Product Manager Paradox
PPT
Inspiring Students
KEY
戦略的設計入門
PDF
Kane Chapter 9: Multiliteracies
PPTX
Top ten slide tips
PDF
Improving Bounce Rate
PDF
Email Marketing For Small Business
PDF
TEDx Seattle 2013
ALA Preconference Making it Stick
How to mobilize followers
Knowing God
Building your Personal Brand
Connectivist PD
Social Business: Be Social, Don't Use Social
The challenge
Leading Through Change: Inspiring Awakening
Success Factors of the Connected Home - Applications
Secrets Of An Impromptu
Oow 2008 Final
The Product Manager Paradox
Inspiring Students
戦略的設計入門
Kane Chapter 9: Multiliteracies
Top ten slide tips
Improving Bounce Rate
Email Marketing For Small Business
TEDx Seattle 2013
Ad

More from Eric Hogue (12)

PDF
Au secours, mon application est brisée - Ou comment déboguer
PDF
Introduction à l'intégration continue en PHP
PDF
Commencer avec le TDD
PDF
Introduction à l’intégration continue avec Jenkins
PDF
Introduction to Continuous Integration with Jenkins
PDF
Guarding Your Code Against Bugs with Continuous Testing
PDF
Continuous testing In PHP
PDF
La sécurité des communications avec GPG
PDF
Getting started with TDD - Confoo 2014
PDF
Commencer avec le tdd
PDF
Introduction to ci with jenkins
PPT
Integration continue
Au secours, mon application est brisée - Ou comment déboguer
Introduction à l'intégration continue en PHP
Commencer avec le TDD
Introduction à l’intégration continue avec Jenkins
Introduction to Continuous Integration with Jenkins
Guarding Your Code Against Bugs with Continuous Testing
Continuous testing In PHP
La sécurité des communications avec GPG
Getting started with TDD - Confoo 2014
Commencer avec le tdd
Introduction to ci with jenkins
Integration continue

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PDF
Approach and Philosophy of On baking technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Empathic Computing: Creating Shared Understanding
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Cloud computing and distributed systems.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
Approach and Philosophy of On baking technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Network Security Unit 5.pdf for BCA BBA.
Agricultural_Statistics_at_a_Glance_2022_0.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Review of recent advances in non-invasive hemoglobin estimation
Empathic Computing: Creating Shared Understanding
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Reach Out and Touch Someone: Haptics and Empathic Computing
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Chapter 3 Spatial Domain Image Processing.pdf
MYSQL Presentation for SQL database connectivity
Unlocking AI with Model Context Protocol (MCP)
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
A Presentation on Artificial Intelligence
Diabetes mellitus diagnosis method based random forest with bat algorithm
Cloud computing and distributed systems.

Continuous Testing