Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

tests and
 the database

Slide 3

Slide 3 text

hiro shima .rb #67 • Sinatra • Sequel • JRuby

Slide 4

Slide 4 text

hiro shima .rb #67

Slide 5

Slide 5 text

hiro shima .rb #67

Slide 6

Slide 6 text

hiro shima .rb #67 took 20s.

Slide 7

Slide 7 text

hiro shima .rb #67 took 20s.

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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)

Slide 13

Slide 13 text

hiro shima .rb #67

Slide 14

Slide 14 text

hiro shima .rb #67

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

hiro shima .rb #67

Slide 21

Slide 21 text

hiro shima .rb #67

Slide 22

Slide 22 text

hiro shima .rb #67

Slide 23

Slide 23 text

hiro shima .rb #67

Slide 24

Slide 24 text

hiro shima .rb #67 still
 20s cost remains

Slide 25

Slide 25 text

hiro shima .rb #67 still
 20s cost remains

Slide 26

Slide 26 text

hiro shima .rb #67 still
 20s cost remains

Slide 27

Slide 27 text

hiro shima .rb #67 still
 20s cost remains

Slide 28

Slide 28 text

hiro shima .rb #67 still
 20s cost remains

Slide 29

Slide 29 text

hiro shima .rb #67

Slide 30

Slide 30 text

hiro shima .rb #67

Slide 31

Slide 31 text

hiro shima .rb #67 the end