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
320
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
380
OpenBSD and Ruby
jmettraux
1
700
Ruby and FFI
jmettraux
0
380
headless in Hiroshima.rb #061
jmettraux
0
350
Ruby methods in ect - Hiroshima.rb #058
jmettraux
0
1.4k
flor - hubristic interpreter - RubyKaigi 2017
jmettraux
1
1.7k
deli @ Hiroshima.rb #057
jmettraux
0
1.4k
suhi215 yahoo proxy in python
jmettraux
0
1.6k
chruby
jmettraux
0
600
Other Decks in Programming
See All in Programming
AIコードエディタの基盤となるLLMのFlutter性能評価
alquist4121
0
190
英語文法から学ぶ、クリーンな設計の秘訣
newnomad
1
290
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
670
Java 24まとめ / Java 24 summary
kishida
3
400
自分のために作ったアプリが、グローバルに使われるまで / Indie App Development Lunch LT
pixyzehn
1
150
技術選定を未来に繋いで活用していく
sakito
3
100
いまさら聞けない生成AI入門: 「生成AIを高速キャッチアップ」
soh9834
15
4.3k
AtCoder Heuristic First-step Vol.1 講義スライド
terryu16
3
1.1k
Defying Front-End Inertia: Inertia.js on Rails
skryukov
0
430
OpenTelemetryを活用したObservability入門 / Introduction to Observability with OpenTelemetry
seike460
PRO
1
410
プログラミング教育のコスパの話
superkinoko
0
130
Agentic Applications with Symfony
el_stoffel
2
220
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
245
12k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.4k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The Cult of Friendly URLs
andyhume
78
6.3k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
Rails Girls Zürich Keynote
gr2m
94
13k
Optimising Largest Contentful Paint
csswizardry
35
3.2k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Side Projects
sachag
452
42k
Optimizing for Happiness
mojombo
377
70k
Product Roadmaps are Hard
iamctodd
PRO
52
11k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7.1k
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