Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
tests and the database
Search
John Mettraux
November 29, 2018
Programming
0
270
tests and the database
making some tests faster by starting from test database dumps
John Mettraux
November 29, 2018
Tweet
Share
More Decks by John Mettraux
See All by John Mettraux
hiroshima.rb #70 pomodoro
jmettraux
0
310
OpenBSD and Ruby
jmettraux
1
570
Ruby and FFI
jmettraux
0
310
headless in Hiroshima.rb #061
jmettraux
0
270
Ruby methods in ect - Hiroshima.rb #058
jmettraux
0
960
flor - hubristic interpreter - RubyKaigi 2017
jmettraux
1
1.1k
deli @ Hiroshima.rb #057
jmettraux
0
920
suhi215 yahoo proxy in python
jmettraux
0
1.1k
chruby
jmettraux
0
500
Other Decks in Programming
See All in Programming
slog登場に伴うloggerの取り回し手法の見直し / kamakura.go #6
arthur1
0
140
Good first issues of TypeProf
mame
4
600
The Cutting Edge Of Versioning (LambdaConf 2024)
chriskrycho
0
250
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
13
4.4k
freeeのエンジニアが 就活で出そうな コーディングテストを 解説してみる
freee
1
170
Slackワークフローで感謝を伝える機能/WiFi 自動接続/Figma to React Component/障害レポート君 Team3@NOT A HOTEL
nakaohiroshi
0
110
WinActorの勉強を継続する方法
tamai_63
0
130
The World is a Network (and We Are Just Nodes)
whatyouhide
0
100
RustでAWS Lambda functionをいい感じに書く
taiki45
2
150
RaaP
ksss
0
160
Sheets API使ってみた
toshi0383
2
180
Exploring the Implementation of “t.Run”, “t.Parallel”, and “t.Cleanup”
akarin
1
160
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Writing Fast Ruby
sferik
622
60k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
245
20k
Into the Great Unknown - MozCon
thekraken
15
1.1k
Art, The Web, and Tiny UX
lynnandtonic
290
19k
The Art of Programming - Codeland 2020
erikaheidi
43
12k
How to name files
jennybc
65
94k
How GitHub (no longer) Works
holman
305
140k
Producing Creativity
orderedlist
PRO
338
39k
Side Projects
sachag
451
41k
Transcript
None
tests and the database
hiro shima .rb #67 • Sinatra • Sequel • JRuby
hiro shima .rb #67
hiro shima .rb #67
hiro shima .rb #67 took 20s.
hiro shima .rb #67 took 20s.
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
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
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
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
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)
hiro shima .rb #67
hiro shima .rb #67
hiro shima .rb #67 what if we had a dump
of the test database, right after load_integration_fixtures() ?
hiro shima .rb #67 what if we had a dump
of the test database, right after load_integration_fixtures() ?
hiro shima .rb #67 what if we had a dump
of the test database, right after load_integration_fixtures() ?
hiro shima .rb #67 what if we had a dump
of the test database, right after load_integration_fixtures() ?
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
hiro shima .rb #67
hiro shima .rb #67
hiro shima .rb #67
hiro shima .rb #67
hiro shima .rb #67 still 20s cost remains
hiro shima .rb #67 still 20s cost remains
hiro shima .rb #67 still 20s cost remains
hiro shima .rb #67 still 20s cost remains
hiro shima .rb #67 still 20s cost remains
hiro shima .rb #67
hiro shima .rb #67
hiro shima .rb #67 the end