SlideShare a Scribd company logo
1 of 99
Download to read offline
Rocket Fuelled
 Cucumbers




            Joseph Wilk
Dealing with an
Outbreak of Cucumbers




                Joseph Wilk
No Cucumbers where
harmed in the making of
   this presentation.

             Just mildly shaken up
Scenario: Happy Railsconf attendees
 Given you have a vague idea what Cucumber is
 When Joseph completes his presentation
 Then you should understand the scaling choices
 And you should feel better prepared to face them
Cucumber
                     Feature: Filling Cucumbers with
•   BDD framework    rocket fuel

•   Plaintext        Scenario: Rocket fuel
                       Given I have trained monkeys
•   Promotes           When I click the launch button
    communication      Then the monkeys should not die



                    Given /^I have trained monkeys$/ do
                      @test_pilots << Monkeys.new
                    end
Cucumber provides the venue
   Your code makes it slow


                  Shame on you
What are Acceptance Tests?

  • Customer-facing
  • Cut through the whole stack
  • Examples of how the system is intended
    to be used
You made
me Cuke
1 minute ~ build
Local builds




1 minute ~ build
Local builds
Autotest




   1 minute ~ build
Local builds
Autotest       Growl




   1 minute ~ build
Don’t
Panic
Slow testing problems

          Running all the Cukes
             takes too long!


          Development is slowed
         down by the time to run
             focused Cukes
Types of Feedback
              + Speed
Development   - Confidence




              - Speed
Test Build    + Confidence
Happiness is a
10 min build time
Slow builds are
the enemy of
continuous integration
Development Feedback

   Its too slow to run the cukes.
 Just push the code and run away
Reuse - Spork
                 $ spork cucumber
                 $ cucumber --drb

require 'rubygems'
require 'spork'

Spork.prefork do
  puts "I'm loading all the heavy stuff..."
end

Spork.each_run do
  puts "I'm loading the stuff just for this run..."
  # Cucumber hooks must go here
end
                                       git://github.com/timcharper/spork.git
Slow services
•   Search
                     Before('@solr') do
    •   Solr
                       Solr.boot unless Solr.running?
    •   Sphinx       end
•   Databases
    •   Mongo        Feature: Searching

    •   Redis
                     @solr
    •   Mysql        Scenario: Indexed search
•   Message Queues     Given ...
                       When ...
    •   RabbitMQ
                       Then ...
Run Just Enough Tests
                       Autotest
#   *   Test files must be stored in test/
#   *   Test files names must start with test_
#   *   Test class names must start with Test
#   *   Implementation files must be stored in lib/
#   *   Implementation files must match up with a
#        test file named
#        test_.*implementation.rb


                       Cucover

@analyzer = Rcov::CodeCoverageAnalyzer.new
http://vimeo.com/12500864
Slicing Features
@media, @public
Feature: Visitor views artist’s media

@feed, @admin
Feature: Logged in user views views their activity feed


 Tagging                    $ cucumber --tags @media

 Filenames                  $ cucumber visitor_*

 Subsystems                 $ cucumber features/admin/*

 Profiles                    $ cucumber --profile admin
Just enough Database
Just enough Database
                           INSERT INTO `cities`
                        (`name`) VALUES ('Test name')



   SELECT * FROM `cities`                    INSERT INTO
  WHERE (`cities`.`id` = 105838)               `venues` ...



                                           SELECT * FROM
Cache       city data
                                              `venues`
                                             WHERE ...


                                               venue data     Cache
Test Build Feedback

  Commit code
 Have a 1 hour nap
Options

• Hardware
• Intelligent test selection
• Tighter focused tests
• Divide and Conquer
Testjour
Songkick.com
254 Features, 1257 scenarios, 10807 steps
1 build server ~ 4 hours
5 build servers ~ 2 hours
120 sad minutes of my life...
$ git clone git://github.com/brynary/testjour.git
$ rake gem install

$ testjour --help
$ git clone git://github.com/brynary/testjour.git
$ rake gem install

$ testjour --help
 testjour help:
Testjour
                            Worker
                    Slave
                            Worker
         Redis
         Work               Worker
Master              Slave
         Queue              Worker

                            Worker
                    Slave
                            Worker
Testjour
                                    Worker
         rsync - code       Slave
                                    Worker
                 Redis
                 Work               Worker
Master                      Slave
                 Queue              Worker

                                    Worker
         rsync - code       Slave
                                    Worker
Testjour
                                    Worker
         rsync - code       Slave
                                    Worker
                 Redis
                 Work               Worker
Master                      Slave
                 Queue              Worker

                                    Worker
         rsync - code       Slave
                                    Worker
Testjour
                                    Worker
         rsync - code       Slave
                                    Worker
                 Redis
                 Work               Worker
Master                      Slave
                 Queue              Worker

                                    Worker
         rsync - code       Slave
                                    Worker
Looking to the Cloud

EC2, Rackspace Cloud, Windows Azure
Looking to the Cloud

EC2, Rackspace Cloud, Windows Azure



  1 build server   ~ 4 hours
Looking to the Cloud

EC2, Rackspace Cloud, Windows Azure



  1 build server   ~ 4 hours
  20 build servers ~ 11:40 minutes
Looking to the Cloud

EC2, Rackspace Cloud, Windows Azure



  1 build server   ~ 4 hours
  20 build servers ~ 11:40 minutes

           $2068.99 / $3000
Ec2
Disc image

  AMI




slim-sumo
Ec2
Disc image

  AMI
             Launch




slim-sumo
Ec2
Disc image
                        ec2    ec2    ec2    ec2
  AMI
                       node   node   node   node
             Launch




slim-sumo
Ec2
Disc image
                            ec2     ec2      ec2     ec2
  AMI
                           node    node     node    node
             Launch


                                    Build
                      ENV['EC2_URL'] = ec2_url
                      require 'slim-sumo'
                      Sumo.new.running.map{|ec2_node|
                      ec2_node[:hostname]}

slim-sumo
http://vimeo.com/12467100
require 'rubygems'
require 'hydra'
require 'hydra/tasks'

Hydra::TestTask.new('hydra') do |t|
  t.add_files 'features/**/*.feature'
  t.verbose = false
  t.autosort = false
end
“Buy lots of hardware”
“Buy lots of hardware”


“more hardware please”
“Buy lots of hardware”


   “more hardware please”


“Just a little bit more hardware”
“Buy lots of hardware”


   “more hardware please”


“Just a little bit more hardware”
Just run the tests
  that matter...
Failure probability
         matters
European Computing manufacturer
Failure probability
         matters
European Computing manufacturer

   Automated test suite   ~ 18 hours
Failure probability
         matters
European Computing manufacturer

   Automated test suite   ~ 18 hours

   Tests that were most ~ 2 hours
   likely to fail
http://vimeo.com/12467122
Tests that
never fail
Tests that
never fail
Tests which      Tests that
regularly fail   never fail
Tests which      Tests that
regularly fail   never fail




Daily Build
Tests which       Tests that
regularly fail    never fail




Daily Build      Nightly Build
Tests which                   Tests that
      regularly fail                never fail




       Daily Build                Nightly Build

$cucumber --tags ~@nightly   $cucumber --tags @nightly
Flickering Confidence
Flickering Confidence
               FAIL
Flickering Confidence
               FAIL

               FAIL
Flickering Confidence
               FAIL

               FAIL

               PASS
Flickering Confidence
                     FAIL

                     FAIL

                     PASS




  Main   @flicker   Flicker
Divide and conquer
                        7     7     7
 1 hour
                        7     7     7

                        7     7     7


• Rails - Engines
• Service Orientated Architecture
Divide and Concuquer
Divide and Concuquer
Divide and Concuquer
Divide and Concuquer
Divide and Concuquer
Divide and Concuquer

Scenario: Related artists
 Given an artist “SYGC”
 And “M.Bison” is related to “SYGC”
 When I visit the artist
 Then I should see within Similar
      Artists a link to “M.Bison”
Divide and conquer


   Rails


Scenario: Related artists
 Given an artist “SYGC”
 And “M.Bison” is related to “SYGC”
 When I visit the artist
 Then I should see within Similar
      Artists a link to “M.Bison”
Divide and conquer

                                      Related
   Rails                              Artists
                                      Service

Scenario: Related artists
 Given an artist “SYGC”
 And “M.Bison” is related to “SYGC”
 When I visit the artist
 Then I should see within Similar
      Artists a link to “M.Bison”
Divide and conquer

                 related(artist)
                                      Related
   Rails                              Artists
                                      Service

Scenario: Related artists
 Given an artist “SYGC”
 And “M.Bison” is related to “SYGC”
 When I visit the artist
 Then I should see within Similar
      Artists a link to “M.Bison”
Divide and conquer

                 related(artist)
                                      Related
   Rails             HTML             Artists
                                      Service

Scenario: Related artists
 Given an artist “SYGC”
 And “M.Bison” is related to “SYGC”
 When I visit the artist
 Then I should see within Similar
      Artists a link to “M.Bison”
Divide and conquer

          related(artist)
                                        Related
Rails         HTML                      Artists
                                        Service

                            Scenario: Related artists
                             Given an artist “SYGC”
                             And “M.Bison” is related to “SYGC”
                             When I visit the artist
                             Then I should see within Similar
                                  Artists a link to “M.Bison”
Divide and conquer

            related(artist)
                                                   Related
Rails               HTML                           Artists
                                                   Service
        unit test          unit test
                                       Scenario: Related artists
                                        Given an artist “SYGC”
                                        And “M.Bison” is related to “SYGC”
                                        When I visit the artist
                                        Then I should see within Similar
                                             Artists a link to “M.Bison”
Don’t use Acceptance
        tests
http://jamesshore.com/Blog/Alternatives-
        to-Acceptance-Testing.html

  Heresy!
Pairwise
Scenario: Testing Cucumber against different environments
  Given I have a rails app <Rails version>
  And I’m using Ruby <Ruby version>
  And I am using the <Test Framework>
  And I am using the driver <Driver>
  Then Cucumber should install and play nicely
  Examples:
  | Rails version | Ruby version | test framework | Driver     |
  |           3.0 |        1.8.7 | Rspec          | Webrat     |
  |           3.0 |        1.8.7 | Testunit       | Capybara   |
  |           3.0 |        1.8.7 | Rspec          | Capybara   |
  |           3.0 |        1.8.7 | Testunit       | Webrat     |
  |           3.0 |          1.9 | Rspec          | Webrat     |
  |           3.0 |          1.9 | Testunit       | Webrat     |
  |         2.3.1 |          1.9 | Rspec          | Webrat     |
                             ....
| Rails version | Ruby version | test framework   |   Driver     |
|         2.3.1 |        1.8.7 | Rspec            |   Webrat     |
|         2.3.1 |        1.8.7 | Rspec            |   Capybara   |
|         2.3.1 |        1.8.7 | Testunit         |   Webrat     |
|         2.3.1 |        1.8.7 | Testunit         |   Capybara   |
|         2.3.1 |        1.9   | Rspec            |   Capybara   |
|         2.3.1 |        1.9   | Rspec            |   Webrat     |
|         2.3.1 |        1.9   | Testunit         |   Capybara   |
|         2.3.1 |        1.9   | Testunit         |   Webrat |

                           ....




“most faults are caused by interactions of at most two
factors”
Pairwise


http://www.screencast.com/t/NGI0NjVk
Just when you thought
things were going well

We should add some
funky Ajax features
JavaScript


Browser based             In-memory
Selenium, Watir           Celerity
Need for speed
 Webrat 0.8



Celerity                                   12




  Watir                                    12




Selenium                                    12.9


           0   3.75        7.5       11.25         15
                 start-up time (seconds)
Capybara               sudo gem install capybara


Like Webrat but bigger



      envjs              gem install envjs


      Johnson            gem install johnson --prerelease

    spidermonkey
http://vimeo.com/12467133
Capybara-envjs
Find the right
compromise for you
Find the right
 compromise for you

Slow test builds produce
  slow release cycles
Find the right
 compromise for you

Slow test builds produce
  slow release cycles

  Your test builds are a
   goldmine of data
Thanks
                              Its been
                             emotional




        Joseph Wilk
http://blog.josephwilk.net
       @josephwilk

More Related Content

What's hot

DataMapper on Infinispan
DataMapper on InfinispanDataMapper on Infinispan
DataMapper on InfinispanLance Ball
 
Introduction to Ansible (Pycon7 2016)
Introduction to Ansible (Pycon7 2016)Introduction to Ansible (Pycon7 2016)
Introduction to Ansible (Pycon7 2016)Ivan Rossi
 
Gate of Agile Web Development
Gate of Agile Web DevelopmentGate of Agile Web Development
Gate of Agile Web DevelopmentKoichi ITO
 
Практики применения JRuby
Практики применения JRubyПрактики применения JRuby
Практики применения JRuby.toster
 
Invoke dynamic your api to hotspot
Invoke dynamic your api to hotspotInvoke dynamic your api to hotspot
Invoke dynamic your api to hotspotBoundary
 
TRICK2013 Results
TRICK2013 ResultsTRICK2013 Results
TRICK2013 Resultsmametter
 
InSpec Workshop at Velocity London 2018
InSpec Workshop at Velocity London 2018InSpec Workshop at Velocity London 2018
InSpec Workshop at Velocity London 2018Mandi Walls
 
Fiber in the 10th year
Fiber in the 10th yearFiber in the 10th year
Fiber in the 10th yearKoichi Sasada
 
Leave end-to-end testing to Capybara
Leave end-to-end testing to CapybaraLeave end-to-end testing to Capybara
Leave end-to-end testing to CapybaraHiroshi SHIBATA
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011bobmcwhirter
 
TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011Lance Ball
 
An introduction and future of Ruby coverage library
An introduction and future of Ruby coverage libraryAn introduction and future of Ruby coverage library
An introduction and future of Ruby coverage librarymametter
 
Embedded software development using BDD
Embedded software development using BDDEmbedded software development using BDD
Embedded software development using BDDItamar Hassin
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesHiroshi SHIBATA
 

What's hot (17)

DataMapper on Infinispan
DataMapper on InfinispanDataMapper on Infinispan
DataMapper on Infinispan
 
Devignition 2011
Devignition 2011Devignition 2011
Devignition 2011
 
Introduction to Ansible (Pycon7 2016)
Introduction to Ansible (Pycon7 2016)Introduction to Ansible (Pycon7 2016)
Introduction to Ansible (Pycon7 2016)
 
Gate of Agile Web Development
Gate of Agile Web DevelopmentGate of Agile Web Development
Gate of Agile Web Development
 
Практики применения JRuby
Практики применения JRubyПрактики применения JRuby
Практики применения JRuby
 
Invoke dynamic your api to hotspot
Invoke dynamic your api to hotspotInvoke dynamic your api to hotspot
Invoke dynamic your api to hotspot
 
TRICK2013 Results
TRICK2013 ResultsTRICK2013 Results
TRICK2013 Results
 
InSpec Workshop at Velocity London 2018
InSpec Workshop at Velocity London 2018InSpec Workshop at Velocity London 2018
InSpec Workshop at Velocity London 2018
 
Fiber in the 10th year
Fiber in the 10th yearFiber in the 10th year
Fiber in the 10th year
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
Leave end-to-end testing to Capybara
Leave end-to-end testing to CapybaraLeave end-to-end testing to Capybara
Leave end-to-end testing to Capybara
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011
 
TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011
 
An introduction and future of Ruby coverage library
An introduction and future of Ruby coverage libraryAn introduction and future of Ruby coverage library
An introduction and future of Ruby coverage library
 
Euruko 2012 - JRuby
Euruko 2012 - JRubyEuruko 2012 - JRuby
Euruko 2012 - JRuby
 
Embedded software development using BDD
Embedded software development using BDDEmbedded software development using BDD
Embedded software development using BDD
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 Minutes
 

Viewers also liked

Ruby onrails cucumber-rspec-capybara
Ruby onrails cucumber-rspec-capybaraRuby onrails cucumber-rspec-capybara
Ruby onrails cucumber-rspec-capybaraBindesh Vijayan
 
Capybara + RSpec - ruby dsl-based web ui qa automation
Capybara + RSpec - ruby dsl-based web ui qa automationCapybara + RSpec - ruby dsl-based web ui qa automation
Capybara + RSpec - ruby dsl-based web ui qa automationCOMAQA.BY
 
Mobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appiumMobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appiumSelenium Cucumber
 
Future of test automation tools & infrastructure
Future of test automation tools & infrastructureFuture of test automation tools & infrastructure
Future of test automation tools & infrastructureAnand Bagmar
 
Using Selenium and Cucumber to test a Healthcare Information System
Using Selenium and Cucumber to test a Healthcare Information SystemUsing Selenium and Cucumber to test a Healthcare Information System
Using Selenium and Cucumber to test a Healthcare Information Systemandytinkham
 
Mobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appiumMobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appiumSelenium Cucumber
 
Cucumber - Curso de Automatización de Pruebas
Cucumber - Curso de Automatización de PruebasCucumber - Curso de Automatización de Pruebas
Cucumber - Curso de Automatización de PruebasTestingBaires
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumDev9Com
 

Viewers also liked (11)

Ruby onrails cucumber-rspec-capybara
Ruby onrails cucumber-rspec-capybaraRuby onrails cucumber-rspec-capybara
Ruby onrails cucumber-rspec-capybara
 
Capybara + RSpec - ruby dsl-based web ui qa automation
Capybara + RSpec - ruby dsl-based web ui qa automationCapybara + RSpec - ruby dsl-based web ui qa automation
Capybara + RSpec - ruby dsl-based web ui qa automation
 
Cucumber_Capybara
Cucumber_CapybaraCucumber_Capybara
Cucumber_Capybara
 
Mobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appiumMobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appium
 
Future of test automation tools & infrastructure
Future of test automation tools & infrastructureFuture of test automation tools & infrastructure
Future of test automation tools & infrastructure
 
Using Selenium and Cucumber to test a Healthcare Information System
Using Selenium and Cucumber to test a Healthcare Information SystemUsing Selenium and Cucumber to test a Healthcare Information System
Using Selenium and Cucumber to test a Healthcare Information System
 
Cucumber
CucumberCucumber
Cucumber
 
Mobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appiumMobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appium
 
Cucumber - Curso de Automatización de Pruebas
Cucumber - Curso de Automatización de PruebasCucumber - Curso de Automatización de Pruebas
Cucumber - Curso de Automatización de Pruebas
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and Selenium
 
Cucumber ppt
Cucumber pptCucumber ppt
Cucumber ppt
 

Similar to Rocket Fuelled Cucumbers

Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Anton Arhipov
 
Lessons Learnt in 2009
Lessons Learnt in 2009Lessons Learnt in 2009
Lessons Learnt in 2009pratiknaik
 
Spinnaker 파트 1
Spinnaker 파트 1Spinnaker 파트 1
Spinnaker 파트 1Steven Shim
 
Getting Started with PoolParty and EC2
Getting Started with PoolParty and EC2Getting Started with PoolParty and EC2
Getting Started with PoolParty and EC2Nate Murray
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Yevgeniy Brikman
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725MortazaJohari
 
introduction-infra-as-a-code using terraform
introduction-infra-as-a-code using terraformintroduction-infra-as-a-code using terraform
introduction-infra-as-a-code using terraformniyof97
 
High Performance Ruby: Evented vs. Threaded
High Performance Ruby: Evented vs. ThreadedHigh Performance Ruby: Evented vs. Threaded
High Performance Ruby: Evented vs. ThreadedEngine Yard
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Puppet
 
How to test code with mruby
How to test code with mrubyHow to test code with mruby
How to test code with mrubyHiroshi SHIBATA
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Celery: The Distributed Task Queue
Celery: The Distributed Task QueueCelery: The Distributed Task Queue
Celery: The Distributed Task QueueRichard Leland
 
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David ShawBeginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David ShawRedspin, Inc.
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, Inc.
 
ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)Shashikant Jagtap
 
Aloha RubyConf 2012 - JRuby
Aloha RubyConf 2012 - JRubyAloha RubyConf 2012 - JRuby
Aloha RubyConf 2012 - JRubyCharles Nutter
 

Similar to Rocket Fuelled Cucumbers (20)

Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012
 
Lessons Learnt in 2009
Lessons Learnt in 2009Lessons Learnt in 2009
Lessons Learnt in 2009
 
Spinnaker 파트 1
Spinnaker 파트 1Spinnaker 파트 1
Spinnaker 파트 1
 
Getting Started with PoolParty and EC2
Getting Started with PoolParty and EC2Getting Started with PoolParty and EC2
Getting Started with PoolParty and EC2
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
introduction-infra-as-a-code using terraform
introduction-infra-as-a-code using terraformintroduction-infra-as-a-code using terraform
introduction-infra-as-a-code using terraform
 
High Performance Ruby: Evented vs. Threaded
High Performance Ruby: Evented vs. ThreadedHigh Performance Ruby: Evented vs. Threaded
High Performance Ruby: Evented vs. Threaded
 
Puppet NBLUG 2008-09
Puppet NBLUG 2008-09Puppet NBLUG 2008-09
Puppet NBLUG 2008-09
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
 
How to test code with mruby
How to test code with mrubyHow to test code with mruby
How to test code with mruby
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Effective code reviews
Effective code reviewsEffective code reviews
Effective code reviews
 
Celery: The Distributed Task Queue
Celery: The Distributed Task QueueCelery: The Distributed Task Queue
Celery: The Distributed Task Queue
 
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David ShawBeginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw
 
Quick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico LinQuick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico Lin
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)
 
Aloha RubyConf 2012 - JRuby
Aloha RubyConf 2012 - JRubyAloha RubyConf 2012 - JRuby
Aloha RubyConf 2012 - JRuby
 
Ruby Under The Hood
Ruby Under The HoodRuby Under The Hood
Ruby Under The Hood
 

More from Joseph Wilk

Acceptance testing in the land of the startup
Acceptance testing in the land of the startup Acceptance testing in the land of the startup
Acceptance testing in the land of the startup Joseph Wilk
 
Rubykaigi 2011 Limited Red talk
Rubykaigi 2011 Limited Red talkRubykaigi 2011 Limited Red talk
Rubykaigi 2011 Limited Red talkJoseph Wilk
 
The Limited Red Society
The Limited Red SocietyThe Limited Red Society
The Limited Red SocietyJoseph Wilk
 
The Limited Red Society
The Limited Red Society The Limited Red Society
The Limited Red Society Joseph Wilk
 
Testing outside of the Ruby World
Testing outside of the Ruby WorldTesting outside of the Ruby World
Testing outside of the Ruby WorldJoseph Wilk
 
Rubyconf lightning talk
Rubyconf lightning talkRubyconf lightning talk
Rubyconf lightning talkJoseph Wilk
 
Acceptance testing in the land of the startup
Acceptance testing in the land of the startupAcceptance testing in the land of the startup
Acceptance testing in the land of the startupJoseph Wilk
 
Cucumber Patterns Workshop
Cucumber Patterns WorkshopCucumber Patterns Workshop
Cucumber Patterns WorkshopJoseph Wilk
 
Cucumber Ru09 Web
Cucumber Ru09 WebCucumber Ru09 Web
Cucumber Ru09 WebJoseph Wilk
 
Dynamic Workflow Pulling the Strings
Dynamic Workflow Pulling the StringsDynamic Workflow Pulling the Strings
Dynamic Workflow Pulling the StringsJoseph Wilk
 
Outside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and RspecOutside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and RspecJoseph Wilk
 
Testing with Ruby
Testing with RubyTesting with Ruby
Testing with RubyJoseph Wilk
 

More from Joseph Wilk (16)

Frozenrails2011
Frozenrails2011Frozenrails2011
Frozenrails2011
 
Acceptance testing in the land of the startup
Acceptance testing in the land of the startup Acceptance testing in the land of the startup
Acceptance testing in the land of the startup
 
Rubykaigi 2011 Limited Red talk
Rubykaigi 2011 Limited Red talkRubykaigi 2011 Limited Red talk
Rubykaigi 2011 Limited Red talk
 
The Limited Red Society
The Limited Red SocietyThe Limited Red Society
The Limited Red Society
 
The Limited Red Society
The Limited Red Society The Limited Red Society
The Limited Red Society
 
Spa2011
Spa2011Spa2011
Spa2011
 
Testing outside of the Ruby World
Testing outside of the Ruby WorldTesting outside of the Ruby World
Testing outside of the Ruby World
 
Rubyconf lightning talk
Rubyconf lightning talkRubyconf lightning talk
Rubyconf lightning talk
 
Acceptance testing in the land of the startup
Acceptance testing in the land of the startupAcceptance testing in the land of the startup
Acceptance testing in the land of the startup
 
Cucumber Patterns Workshop
Cucumber Patterns WorkshopCucumber Patterns Workshop
Cucumber Patterns Workshop
 
Musichackday
MusichackdayMusichackday
Musichackday
 
Cucumber Ru09 Web
Cucumber Ru09 WebCucumber Ru09 Web
Cucumber Ru09 Web
 
Cucumbered
CucumberedCucumbered
Cucumbered
 
Dynamic Workflow Pulling the Strings
Dynamic Workflow Pulling the StringsDynamic Workflow Pulling the Strings
Dynamic Workflow Pulling the Strings
 
Outside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and RspecOutside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and Rspec
 
Testing with Ruby
Testing with RubyTesting with Ruby
Testing with Ruby
 

Recently uploaded

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

Rocket Fuelled Cucumbers

  • 2. Dealing with an Outbreak of Cucumbers Joseph Wilk
  • 3. No Cucumbers where harmed in the making of this presentation. Just mildly shaken up
  • 4. Scenario: Happy Railsconf attendees Given you have a vague idea what Cucumber is When Joseph completes his presentation Then you should understand the scaling choices And you should feel better prepared to face them
  • 5. Cucumber Feature: Filling Cucumbers with • BDD framework rocket fuel • Plaintext Scenario: Rocket fuel Given I have trained monkeys • Promotes When I click the launch button communication Then the monkeys should not die Given /^I have trained monkeys$/ do @test_pilots << Monkeys.new end
  • 6. Cucumber provides the venue Your code makes it slow Shame on you
  • 7. What are Acceptance Tests? • Customer-facing • Cut through the whole stack • Examples of how the system is intended to be used
  • 8.
  • 10.
  • 11. 1 minute ~ build
  • 13. Local builds Autotest 1 minute ~ build
  • 14. Local builds Autotest Growl 1 minute ~ build
  • 15.
  • 16.
  • 18. Slow testing problems Running all the Cukes takes too long! Development is slowed down by the time to run focused Cukes
  • 19. Types of Feedback + Speed Development - Confidence - Speed Test Build + Confidence
  • 20. Happiness is a 10 min build time
  • 21. Slow builds are the enemy of continuous integration
  • 22. Development Feedback Its too slow to run the cukes. Just push the code and run away
  • 23. Reuse - Spork $ spork cucumber $ cucumber --drb require 'rubygems' require 'spork' Spork.prefork do puts "I'm loading all the heavy stuff..." end Spork.each_run do puts "I'm loading the stuff just for this run..." # Cucumber hooks must go here end git://github.com/timcharper/spork.git
  • 24. Slow services • Search Before('@solr') do • Solr Solr.boot unless Solr.running? • Sphinx end • Databases • Mongo Feature: Searching • Redis @solr • Mysql Scenario: Indexed search • Message Queues Given ... When ... • RabbitMQ Then ...
  • 25. Run Just Enough Tests Autotest # * Test files must be stored in test/ # * Test files names must start with test_ # * Test class names must start with Test # * Implementation files must be stored in lib/ # * Implementation files must match up with a # test file named # test_.*implementation.rb Cucover @analyzer = Rcov::CodeCoverageAnalyzer.new
  • 27. Slicing Features @media, @public Feature: Visitor views artist’s media @feed, @admin Feature: Logged in user views views their activity feed Tagging $ cucumber --tags @media Filenames $ cucumber visitor_* Subsystems $ cucumber features/admin/* Profiles $ cucumber --profile admin
  • 29. Just enough Database INSERT INTO `cities` (`name`) VALUES ('Test name') SELECT * FROM `cities` INSERT INTO WHERE (`cities`.`id` = 105838) `venues` ... SELECT * FROM Cache city data `venues` WHERE ... venue data Cache
  • 30. Test Build Feedback Commit code Have a 1 hour nap
  • 31. Options • Hardware • Intelligent test selection • Tighter focused tests • Divide and Conquer
  • 32. Testjour Songkick.com 254 Features, 1257 scenarios, 10807 steps 1 build server ~ 4 hours 5 build servers ~ 2 hours
  • 33. 120 sad minutes of my life...
  • 34. $ git clone git://github.com/brynary/testjour.git $ rake gem install $ testjour --help
  • 35. $ git clone git://github.com/brynary/testjour.git $ rake gem install $ testjour --help testjour help:
  • 36. Testjour Worker Slave Worker Redis Work Worker Master Slave Queue Worker Worker Slave Worker
  • 37. Testjour Worker rsync - code Slave Worker Redis Work Worker Master Slave Queue Worker Worker rsync - code Slave Worker
  • 38. Testjour Worker rsync - code Slave Worker Redis Work Worker Master Slave Queue Worker Worker rsync - code Slave Worker
  • 39. Testjour Worker rsync - code Slave Worker Redis Work Worker Master Slave Queue Worker Worker rsync - code Slave Worker
  • 40. Looking to the Cloud EC2, Rackspace Cloud, Windows Azure
  • 41. Looking to the Cloud EC2, Rackspace Cloud, Windows Azure 1 build server ~ 4 hours
  • 42. Looking to the Cloud EC2, Rackspace Cloud, Windows Azure 1 build server ~ 4 hours 20 build servers ~ 11:40 minutes
  • 43. Looking to the Cloud EC2, Rackspace Cloud, Windows Azure 1 build server ~ 4 hours 20 build servers ~ 11:40 minutes $2068.99 / $3000
  • 44. Ec2 Disc image AMI slim-sumo
  • 45. Ec2 Disc image AMI Launch slim-sumo
  • 46. Ec2 Disc image ec2 ec2 ec2 ec2 AMI node node node node Launch slim-sumo
  • 47. Ec2 Disc image ec2 ec2 ec2 ec2 AMI node node node node Launch Build ENV['EC2_URL'] = ec2_url require 'slim-sumo' Sumo.new.running.map{|ec2_node| ec2_node[:hostname]} slim-sumo
  • 49. require 'rubygems' require 'hydra' require 'hydra/tasks' Hydra::TestTask.new('hydra') do |t| t.add_files 'features/**/*.feature' t.verbose = false t.autosort = false end
  • 50.
  • 51. “Buy lots of hardware”
  • 52. “Buy lots of hardware” “more hardware please”
  • 53. “Buy lots of hardware” “more hardware please” “Just a little bit more hardware”
  • 54. “Buy lots of hardware” “more hardware please” “Just a little bit more hardware”
  • 55. Just run the tests that matter...
  • 56. Failure probability matters European Computing manufacturer
  • 57. Failure probability matters European Computing manufacturer Automated test suite ~ 18 hours
  • 58. Failure probability matters European Computing manufacturer Automated test suite ~ 18 hours Tests that were most ~ 2 hours likely to fail
  • 60.
  • 63. Tests which Tests that regularly fail never fail
  • 64. Tests which Tests that regularly fail never fail Daily Build
  • 65. Tests which Tests that regularly fail never fail Daily Build Nightly Build
  • 66. Tests which Tests that regularly fail never fail Daily Build Nightly Build $cucumber --tags ~@nightly $cucumber --tags @nightly
  • 70. Flickering Confidence FAIL FAIL PASS
  • 71. Flickering Confidence FAIL FAIL PASS Main @flicker Flicker
  • 72. Divide and conquer 7 7 7 1 hour 7 7 7 7 7 7 • Rails - Engines • Service Orientated Architecture
  • 78. Divide and Concuquer Scenario: Related artists Given an artist “SYGC” And “M.Bison” is related to “SYGC” When I visit the artist Then I should see within Similar Artists a link to “M.Bison”
  • 79. Divide and conquer Rails Scenario: Related artists Given an artist “SYGC” And “M.Bison” is related to “SYGC” When I visit the artist Then I should see within Similar Artists a link to “M.Bison”
  • 80. Divide and conquer Related Rails Artists Service Scenario: Related artists Given an artist “SYGC” And “M.Bison” is related to “SYGC” When I visit the artist Then I should see within Similar Artists a link to “M.Bison”
  • 81. Divide and conquer related(artist) Related Rails Artists Service Scenario: Related artists Given an artist “SYGC” And “M.Bison” is related to “SYGC” When I visit the artist Then I should see within Similar Artists a link to “M.Bison”
  • 82. Divide and conquer related(artist) Related Rails HTML Artists Service Scenario: Related artists Given an artist “SYGC” And “M.Bison” is related to “SYGC” When I visit the artist Then I should see within Similar Artists a link to “M.Bison”
  • 83. Divide and conquer related(artist) Related Rails HTML Artists Service Scenario: Related artists Given an artist “SYGC” And “M.Bison” is related to “SYGC” When I visit the artist Then I should see within Similar Artists a link to “M.Bison”
  • 84. Divide and conquer related(artist) Related Rails HTML Artists Service unit test unit test Scenario: Related artists Given an artist “SYGC” And “M.Bison” is related to “SYGC” When I visit the artist Then I should see within Similar Artists a link to “M.Bison”
  • 85. Don’t use Acceptance tests http://jamesshore.com/Blog/Alternatives- to-Acceptance-Testing.html Heresy!
  • 86. Pairwise Scenario: Testing Cucumber against different environments Given I have a rails app <Rails version> And I’m using Ruby <Ruby version> And I am using the <Test Framework> And I am using the driver <Driver> Then Cucumber should install and play nicely Examples: | Rails version | Ruby version | test framework | Driver | | 3.0 | 1.8.7 | Rspec | Webrat | | 3.0 | 1.8.7 | Testunit | Capybara | | 3.0 | 1.8.7 | Rspec | Capybara | | 3.0 | 1.8.7 | Testunit | Webrat | | 3.0 | 1.9 | Rspec | Webrat | | 3.0 | 1.9 | Testunit | Webrat | | 2.3.1 | 1.9 | Rspec | Webrat | ....
  • 87. | Rails version | Ruby version | test framework | Driver | | 2.3.1 | 1.8.7 | Rspec | Webrat | | 2.3.1 | 1.8.7 | Rspec | Capybara | | 2.3.1 | 1.8.7 | Testunit | Webrat | | 2.3.1 | 1.8.7 | Testunit | Capybara | | 2.3.1 | 1.9 | Rspec | Capybara | | 2.3.1 | 1.9 | Rspec | Webrat | | 2.3.1 | 1.9 | Testunit | Capybara | | 2.3.1 | 1.9 | Testunit | Webrat | .... “most faults are caused by interactions of at most two factors”
  • 89. Just when you thought things were going well We should add some funky Ajax features
  • 90. JavaScript Browser based In-memory Selenium, Watir Celerity
  • 91. Need for speed Webrat 0.8 Celerity 12 Watir 12 Selenium 12.9 0 3.75 7.5 11.25 15 start-up time (seconds)
  • 92. Capybara sudo gem install capybara Like Webrat but bigger envjs gem install envjs Johnson gem install johnson --prerelease spidermonkey
  • 95.
  • 97. Find the right compromise for you Slow test builds produce slow release cycles
  • 98. Find the right compromise for you Slow test builds produce slow release cycles Your test builds are a goldmine of data
  • 99. Thanks Its been emotional Joseph Wilk http://blog.josephwilk.net @josephwilk