Upgrade to Pro — share decks privately, control downloads, hide ads and more …

tests and the database

tests and the database

making some tests faster by starting from test database dumps

John Mettraux

November 29, 2018
Tweet

More Decks by John Mettraux

Other Decks in Programming

Transcript

  1. hiro shima .rb #67 bxs spec/functional/models/sg_mandate_spec.rb:210 bxs spec/functional/models/sg_mandate_spec.rb -e fubar

    bxs spec/functional/models/sg_mandate_spec.rb bxs spec/functional/models/ alias bxs=“bundle exec rspec” bxs
  2. hiro shima .rb #67 bxs spec/functional/models/sg_mandate_spec.rb:210 bxs spec/functional/models/sg_mandate_spec.rb -e fubar

    bxs spec/functional/models/sg_mandate_spec.rb bxs spec/functional/models/ alias bxs=“bundle exec rspec” bxs 30s to 2m 20m to 30m
  3. hiro shima .rb #67 bxs spec/functional/models/sg_mandate_spec.rb:210 bxs spec/functional/models/sg_mandate_spec.rb -e fubar

    bxs spec/functional/models/sg_mandate_spec.rb bxs spec/functional/models/ alias bxs=“bundle exec rspec” bxs focus control
  4. hiro shima .rb #67 bxs spec/functional/models/sg_mandate_spec.rb:210 bxs spec/functional/models/sg_mandate_spec.rb -e fubar

    bxs spec/functional/models/sg_mandate_spec.rb bxs spec/functional/models/ alias bxs=“bundle exec rspec” bxs focus control
  5. hiro shima .rb #67 bxs spec/functional/models/sg_mandate_spec.rb:210 bxs spec/functional/models/sg_mandate_spec.rb -e fubar

    bxs spec/functional/models/sg_mandate_spec.rb bxs spec/functional/models/ alias bxs=“bundle exec rspec” bxs focus control unit (no db access) functional (no browser) integration (selenium)
  6. hiro shima .rb #67 what if we had a dump

    of the test database, right after load_integration_fixtures()
 ?
  7. hiro shima .rb #67 what if we had a dump

    of the test database, right after load_integration_fixtures()
 ?
  8. hiro shima .rb #67 what if we had a dump

    of the test database, right after load_integration_fixtures()
 ?
  9. hiro shima .rb #67 what if we had a dump

    of the test database, right after load_integration_fixtures()
 ?
  10. hiro shima .rb #67 what if we had a dump

    of the test database, right after load_integration_fixtures()
 ? dump: 0.2s dump: 61M load: 1.8s