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
3年間考え続けてきたWebアプリケーションにおけるテストの話
Search
ayato
February 15, 2018
Programming
3
220
3年間考え続けてきたWebアプリケーションにおけるテストの話
ayato
February 15, 2018
Tweet
Share
More Decks by ayato
See All by ayato
Clojureという言語が私逹にもたらしたもの
ayato0211
5
2.9k
Re:REPL-Driven Development
ayato0211
3
1.2k
Meta Template Engine
ayato0211
2
970
超変換! Hiccup data structure!!
ayato0211
2
540
About Integrant
ayato0211
0
470
Muscle Assert
ayato0211
0
210
Clojureを用いたWebアプリケーション開発
ayato0211
2
3k
翻訳にまつわるエトセトラ
ayato0211
6
1.2k
Ring Middleware の基礎
ayato0211
2
240
Other Decks in Programming
See All in Programming
What you can do with Ruby on WebAssembly
kateinoigakukun
0
170
開発を加速する共有Swift Package実践
elmetal
PRO
0
420
Our Websites Need a Lifestyle Change, Not a Diet
ryantownsend
0
150
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
4
90k
What is Parser
yui_knk
9
4.1k
オートマトン学習しろ / Do automata learning
makenowjust
3
130
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
3
470
Kotlin 2.0が与えるAndroid開発の進化
masayukisuda
1
410
Jakarta EE meets AI
ivargrimstad
1
520
サーバーレスで負荷試験!Step Functions + Lambdaを使ったk6の分散実行
shuntakahashi
6
1.6k
unique パッケージから学ぶ interning と weak reference @ Asakusa.go#3
karamaru
2
810
Understand the mechanism! Let's do screenshots tests of Compose Previews with various variations / 仕組みから理解する!Composeプレビューを様々なバリエーションでスクリーンショットテストしよう
sumio
3
810
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.4k
Docker and Python
trallard
39
3k
Happy Clients
brianwarren
96
6.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
48
2.8k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
VelocityConf: Rendering Performance Case Studies
addyosmani
322
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
23
1.7k
A Tale of Four Properties
chriscoyier
155
22k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
41
6.5k
The Invisible Customer
myddelton
119
13k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
Transcript
ؒߟ͑ଓ͚͖ͯͨ 8FCΞϓϦέʔγϣϯ ʹ͓͚Δςετͷ
͋ͽʔ $ZCP[V4UBSUVQT JOD $MPKVSFྺ झຯ&NBDT ݈߁
ࠓͷ
͜Μͳ͜ͱ͢Α എܠ ؒ8FCΞϓϦέʔγϣϯΛ࡞͍ͬͯΔ ͦΕͳΓʹࣦഊΛܦݧͨ͠ ༰ ͍͠Α͔͘Βͳ͍ͱࢥͬͨͱ͜Ζͷղܾ ࡦΛڞ༗͍ͨ͠
ҙ ඞͣ͜͠Ε͕ϕετͱࢥ͍ͬͯͳ͍ Իָੑͷҧ͍ͱ͔͋Δͱࢥ͏ 5%%ʹϑΥʔΧεͨ͠͠·ͤΜ Ͱ͖ͳ͍ ࢀߟఔʹฉ͍ͯͶ
$MPKVSF ؔϓϩάϥϛϯά ͔ͩΒςετ؆୯ͩΑʂ
ςετॻ͘ͷ؆୯ͩΑͶʁ ࢀরಁաੑෆมੑʹΑΓςετ͕༰қ ७ਮͳؔΛॻ͘ͷͰςετ͕༰қ
(require '[clojure.test :as t]) (defn f [x y] (+ x
y)) (t/deftest f-test (t/is (= (f 1 2) 3))
(require '[clojure.test :as t]) (defn f [x y] (+ x
y)) (t/deftest f-test (t/is (= (f 1 2) 3))
࣮ࡍʜ ݱ࣮ͷੈքͰ֎෦ͷγεςϜͱ࿈ܞ͢Δ ։ൃ࣌ʹςετ͕ಉ͡3&1-ͷ্Ͱ࣮ߦ͞ΕͯࠔΔ 03.͕ͳ͍͔ΒΠϯϝϞϦ%#͑ͳ͍ ؔΛࠩ͠ସ͑Α͏ͱ͢Δͱฒྻ࣮ߦͰ͖ͳ͍ ڊେͳσʔλߏͷൺֱͰۤ࿑͢Δ ҙͷ͕ؔظͨ͠௨Γʹ࣮͞Ε͍ͯΔ͔͔Βͳ͍ DMPKVSFTQFDΛHFOFSBUJWFUFTUʹͬͯۤ࿑͢Δ 3JOHϋϯυϥͷςετ͍͠
࣮ࡍʜ ݱ࣮ͷੈքͰ֎෦ͷγεςϜͱ࿈ܞ͢Δ ։ൃ࣌ʹςετ͕ಉ͡3&1-ͷ্Ͱ࣮ߦ͞ΕͯࠔΔ 03.͕ͳ͍͔ΒΠϯϝϞϦ%#͑ͳ͍ ؔΛࠩ͠ସ͑Α͏ͱ͢Δͱฒྻ࣮ߦͰ͖ͳ͍ ڊେͳσʔλߏͷൺֱͰۤ࿑͢Δ ҙͷ͕ؔظͨ͠௨Γʹ࣮͞Ε͍ͯΔ͔͔Βͳ͍ DMPKVSFTQFDΛHFOFSBUJWFUFTUʹͬͯۤ࿑͢Δ 3JOHϋϯυϥͷςετ͍͠ ࢥͬͨΑΓ
ςετ͍͠
جຊํ
جຊํ DMPKVSFUFTUΛجຊʹߟ͑Δ ϞοΫΑΓϦΞϧؔ ฒྻԽͰ͖ΔΑ͏ʹ࣮͢Δ
DMPKVSFUFTUΛجຊʹߟ͑Δ DMPKVSFUFTUͷ্ʹ࡞ΒΕ֦ͨுϓϥάΠϯΛ ར༻͢ΔͨΊ DMPKVSFTQFDͷDMPKVSFUFTUDIFDLͱͷ౷߹ ಠࣗͷςεςΟϯάϑϨʔϜϫʔΫରԠ ͪʹͳΓ͕ͪ
ϞοΫΑΓϦΞϧؔ ϞοΫΛదʹར༻͢Δͷ͍͠ ԿΛςετ͍ͨ͠ͷ͔Α͔͘Βͳ͍ϞοΫ Λར༻ͨ͠ςετ͕ॻ͔ΕΔ
ฒྻԽͰ͖ΔΑ͏ʹ࣮͢Δ ςετͲ͏͕ͬͯ૿͑ͯ͘Δ ಈతܕ͚ݴޠςετ͕࣌ؒʹͳΔ ͕͋Δҹ ฒྻԽ͢Δ͔Ͳ͏͔ͱ͔͘ɺςετͷ࣮ߦ ॱংλΠϛϯάͳͲʹΑͬͯյΕͳ͍Α͏ͳ ಠཱͨ͠ςετΛॻ͚ΔΑ͏ʹ͢Δ
࣮ફฤ
ݱ࣮ੈքʹ͓͚Δ՝ ݱ࣮ͷੈքͰ֎෦ͷγεςϜͱ࿈ܞ͢Δ ։ൃ࣌ʹςετ͕ಉ͡3&1-ͷ্Ͱ࣮ߦ͞ΕͯࠔΔ 03.͕ͳ͍͔ΒΠϯϝϞϦ%#͑ͳ͍ ؔΛࠩ͠ସ͑Α͏ͱ͢Δͱฒྻ࣮ߦͰ͖ͳ͍ ڊେͳσʔλߏͷൺֱͰۤ࿑͢Δ ҙͷ͕ؔظͨ͠௨Γʹ࣮͞Ε͍ͯΔ͔͔Βͳ͍ DMPKVSFTQFDΛHFOFSBUJWFUFTUʹͬͯۤ࿑͢Δ 3JOHϋϯυϥͷςετ͍͠
ݱ࣮ͷੈքͰ֎෦ͷ γεςϜͱ࿈ܞ͢Δ
՝ ֎෦γεςϜςετ࣌ʹଓͰ͖ͳ͍ͨ͘͠ ͳ͍͜ͱ͕͋Δ ςετͷʹϝʔϧඈΜͰ͘Δͱ͔ݏͩ ֎෦γεςϜͳͷͰɺ͖ʹ͢Δͷ͕͍͠ ֎෦γεςϜ͕͑ͳ͍ͱ͖ʹςετ͚͜Δͷ ͪΐͬͱʜ
ղܾࡦ $PNQPOFOU*OUFHSBOUͱ͍͏ϥΠϑαΠΫϧ ཧ༻ͷϚΠΫϩϑϨʔϜϫʔΫΛར༻͢Δ ޙ͔ΒಥͬࠐΉͷେมͳͷͰɺ࠷ॳ͔Βͬ ͓͖ͯ·͠ΐ͏ ֎෦γεςϜΛίϯϙʔωϯτԽͯ͠ɺςετ ༻ίϯϙʔωϯτʹࠩ͠ସ͑Δ
։ൃ࣌ʹςετ͕ ಉ͡3&1-ͷ্Ͱ ࣮ߦ͞ΕͯࠔΔ
՝ ଟ͘ͷϓϩάϥϛϯάݴޠͰςετ ผϓϩηεͰ࣮ߦ͞ΕΔ͜ͱ͕ଟ͍ ։ൃதʹςετΛ࣮ߦ͢Δ߹ʹ3&1-͔Β ςετΛ࣮ߦ͢Δ͜ͱ͕͋Δ 3&1-˺ಉҰ+7.Πϯελϯε ӌᮣʹBMUFSWBSSPPUͱ͔Ͱ͖ͳ͍ ։ൃͱςετͰϦιʔεΛ͍͚͍ͨ
ղܾࡦ BMUFSWBSSPPUΛΘͳ͍ XJUISFEFGTͳͲΛར༻͢ΔͱͱΓ͋͑ͣ٢ ωʔϜεϖʔεʹϕλͰϦιʔεΛఆٛ͠ͳ͍ $PNQPOFOU*OUFHSBOUΛར༻͢Δ͜ͱ NPVOUMJUFXJUITFTTJPOͱ͍͏Έ༗Γ
03.͕ͳ͍͔Β ΠϯϝϞϦ%# ͑ͳ͍
՝ 42-Λॻ͔͘ɺΫΤϦϏϧμͰΈཱͯΔ ςετ࣌ʹΠϯϝϞϦ%#Λར༻͢Δͷ͕͍͠ %#ݻ༗ͷػೳͱ͔͍͕ͪ03.͕ٵऩͯ͠ ͘ΕΔࠩҟ͕ٵऩ͞Εͳ͍ ࣮ߦ͕ؾʹͳΔ͚ͲɺϞοΫͨ͘͠ͳ͍
ղܾࡦ ฒྻԽͰଟগΧόʔͰ͖Δ ͋Δ͍42-ඪ४͚ͩͰͯ͢ॻ͘ ͭΒ͍
ؔΛࠩ͠ସ͑Α͏ ͱ͢Δͱ ฒྻ࣮ߦͰ͖ͳ͍
՝ ͍ΘΏΔϞοΫ͍ͨ͠γʔϯ BMUFSWBSSPPUXJUISFEFGTΛ͏ͱฒྻͰ ࣮ߦͰ͖ͳ͍
ղܾࡦ 1SPUPDPMΛ࣮͓ͬͯͯ͘͠ SFJGZΛ࣮ͬͯΛࠩ͠ସ͑ͨΓ͢Δ %VDUͷ#PVOEBSZͷߟ͑ํ TISVCCFSZͱ͍͏ϥΠϒϥϦ͕ྑ͍
ڊେͳσʔλߏͷ ൺֱͰۤ࿑͢Δ
՝ ಛผͳΫϥεͰͳ͘ϚοϓϕΫλ͚ͩͰ σʔλΛදݱ͢Δ Ͳ͏ͯ͠ωετͨ͠Γɺཁૉ͕ଟ͘ͳͬͨΓ ͢Δͱൺֱ͕͘͠ͳΔ ؔ৺͕͋Δཁૉ;ͨͭɺΈͬͭఔ Ͳͷཁૉ͕ҧͬͨͷ͔͔Βͳ͍
ղܾࡦ ڵຯ͕͋ΔൣғͷൺֱΛߦ͍͍ͨ GVEKFͱ͍͏ϥΠϒϥϦΛ͏ͱDPNQBUJCMFͱ ͍͏දݱ͕͑Δ σʔλߏͷͲ͕͜ҧ͔ͬͨΓ͍ͨ GMBSFͱ͍͏ϥΠϒϥϦΛ͏ͱৄ͍͠EJGG͕ ΈΕΔ
ҙͷ͕ؔظͨ͠ ௨Γʹ࣮͞Ε͍ͯΔ͔ ͔Βͳ͍
՝ ΨϕʔδΠϯΨϕʔδΞτʹͳΓ͍͢ ҙͷؔΛςετ͍ͯ͠Δͱ͜ΖͰɺ·ͱ ͳೖग़ྗΛظ͢ΔΑ͏ʹςετ͕ॻ͚ͯɺ ࣮ࡍʹݺͼग़͠ଆͰͲͷΑ͏ͳ͕͞ΕΔͷ ͔ฦ͞ΕΔͷ͔͔Βͳ͍ ύοͱݟಈ͍͍ͯΔ͚Ͳɺ࣮ظͨ͠ಈ ࡞Ͱͳ͔ͬͨͱ͍͏ࣄଶ͕ى͜Δ
ղܾࡦ ظ͍ͯ͠ΔίτΛDMPKVSFTQFDͰॻ͘ JOTUSVNFOUΛར༻͢Ε͋Δఔ͙͜ͱ͕ Ͱ͖Δ JOTUSVNFOUҙͰىಈ͠ͳ͚Ε͍͚ͳ͍ͷ Ͱɺςετ࣌ʹඞͣىಈ͞ΕΔΑ͏ʹ͢Δ
DMPKVSFTQFDΛ HFOFSBUJWFUFTUʹ ͬͯۤ࿑͢Δ
՝ DMPKVSFTQFDΛHFOFSBUJWFUFTUʹར༻͢Δͱ σʔλͷੜͷਫ਼͕ྑ͘ͳ͍͜ͱ͕͋Δ ͕͔͔࣌ؒͬͨΓɺσʔλͷੜʹࣦഊ͢Δ νΣοΫ͢ΔଆͷDMPKVSFTQFD៉ྷʹॻ͚ͯ ɺͦΕΛຬͨ͢σʔλͷੜޮ͕ѱ͍ DMPKVSFUFTUDIFDL͕ґଘؔʹೖͬͯ͘Δ ϓϩμΫγϣϯͰෆཁ
ղܾࡦ σʔλͷੜํ๏ͪΌΜͱࢦఆ͢Δ TQFDઐ༻ͷωʔϜεϖʔεΛ࡞ͯ͠ɺEFWϓ ϩϑΝΠϧͷͱ͖ͷΈར༻͢ΔΑ͏ʹ͢Δ
3JOHϋϯυϥͷ ςετ͕͍͠
՝ 3JOHϋϯυϥड͚औΔϦΫΤετΛ࠶ݱ͢Δ ͷ͕໘ ϦΫΤετϚοϓΛ฿͢Δඞཁ͕͋Δ ࣮ࡍʹϛυϧΣΞ͕ద༻͞Εͨޙͷ
ղܾࡦ ؤுͬͯϛυϧΣΞΛద༻ͨ͠ޙͷΛ࡞Δ SJOHNPDLͱ͔దʹͬͯ฿ ϛυϧΣΞΛద༻ͨ͠ϋϯυϥΛςετ͢Δ LFSPEPOΛར༻͢Δ एׯςετͷੑ࣭͕ҟͳΔ ϒϥβͷͳ͍ϒϥβςετ
·ͱΊ
·ͱΊ ݱ࣮ੈքݫ͍͠ ԿΛॏཁࢹ͢Δ͔ʹΑͬͯɺΞϓϩʔνมΘͬ ͯ͘Δ ؤுͬͯςετॻ͖·͠ΐ͏