Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Continuous Testing

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Nächste SlideShare
Oow08slides
Oow08slides
Wird geladen in …3
×

Hier ansehen

1 von 48 Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Ähnlich wie Continuous Testing (20)

Anzeige

Aktuellste (20)

Anzeige

Continuous Testing

  1. 1. Continuous Testing Eric Hogue @ehogue erichogue.ca TrueNorth <?PHP?> Uncon November 9, 2013
  2. 2. Cont inuo us Test ing
  3. 3. How Dis I cov ere d it Photo: Morten Diesen http://www.flickr.com/photos/mortendiesen/8091682612
  4. 4. DD T Photo: William Warby http://www.flickr.com/photos/wwarby/2460655511
  5. 5. Photo: ser... ser... http://www.flickr.com/photos/el_ser_lomo/3267627038
  6. 6. Au to Au ma to te m Te at the sts ed Photo: Markus http://www.flickr.com/photos/tschiae/9758986651/
  7. 7. ed Fe ck ba
  8. 8. Photo: Jeffrey Beall http://www.flickr.com/photos/denverjeffrey/5133538450/
  9. 9. G rd ua
  10. 10. lu P ns gi
  11. 11. Guard::PHPUnit2
  12. 12. Installation
  13. 13. Installation Gemfile source 'https://rubygems.org' group :development do gem 'guard' gem 'guard-phpunit2' end
  14. 14. Installation Gemfile source 'https://rubygems.org' group :development do gem 'guard' gem 'guard-phpunit2' end $ bundle install
  15. 15. $ bundle exec guard
  16. 16. $ bundle exec guard
  17. 17. Guardfile guard 'phpunit2', :cli => '--colors' do watch(%r{^.+Test.php$}) end
  18. 18. guard 'phpunit2', :cli => '--colors' do watch(%r{^tests/.+Test.php$}) watch(%r{^src/(.+).php$}) { |m| "tests/#{m[1]}Test.php" } end
  19. 19. %r{^src/(.+).php$} src/TDD/Factorial.php
  20. 20. %r{^src/(.+).php$} src/TDD/Factorial.php "tests/#{m[1]}Test.php" phpunit tests/TDD/FactorialTest.php
  21. 21. Photo: Luis Humberto Molinar Márquez http://www.flickr.com/photos/anktsunamunh/3271371910/ gs tin et S
  22. 22. :all_on_start => true
  23. 23. :all_after_pass => true
  24. 24. :keep_failed => true
  25. 25. Guard::PHPCS Gemfile gem 'guard-phpcs' Guardfile guard 'phpcs', :standard => 'PSR2' do watch(%r{.*.php$}) end
  26. 26. Guard::PHPMD Gemfile gem 'guard-phpmd' Guardfile guard 'phpmd' do watch(%r{.*.php$}) end
  27. 27. Guard::Shell Gemfile gem 'guard-shell' Guardfile guard 'shell' do watch(%r{^.+.php$}) {|m| `php -l #{m[0]}` true } end
  28. 28. Guard::Shell
  29. 29. Ot Gu her ar ds
  30. 30. Inline Guard module ::Guard class Behat < Guard end end
  31. 31. def start puts 'Run all Behat tests' puts `bin/behat --format progress` end
  32. 32. def run_on_change(paths) paths.each do |file| puts "Running behat on #{file}" puts `bin/behat #{file} --format progress` end end
  33. 33. guard 'behat' do watch %r{^features/.+.feature$} end
  34. 34. s n io t a c fi ti Photo: Ben Schumin http://www.flickr.com/photos/schuminweb/9806474636/ o N
  35. 35. Libnotify/Growl Gemfile gem 'libnotify' Guardfile # Linux notification :libnotify # Mac notification :growl
  36. 36. Console Title notification :terminal_title
  37. 37. Console Title notification :terminal_title
  38. 38. tmux notification :tmux, :default_message_format => '%s >> %s', :line_separator => ' > ', :color_location => 'status-left-bg'
  39. 39. notification :off
  40. 40. G rd ua
  41. 41. Questions Comments: https://joind.in/10013 Twitter: @ehogue Blog: http://erichogue.ca/ Damián Navas http://www.flickr.com/photos/wingedwolf/5471047557/

×