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
230
3年間考え続けてきたWebアプリケーションにおけるテストの話
ayato
February 15, 2018
Tweet
Share
More Decks by ayato
See All by ayato
Clojureという言語が私逹にもたらしたもの
ayato0211
6
2.9k
Re:REPL-Driven Development
ayato0211
3
1.2k
Meta Template Engine
ayato0211
2
1k
超変換! Hiccup data structure!!
ayato0211
2
550
About Integrant
ayato0211
0
490
Muscle Assert
ayato0211
0
210
Clojureを用いたWebアプリケーション開発
ayato0211
2
3k
翻訳にまつわるエトセトラ
ayato0211
6
1.2k
Ring Middleware の基礎
ayato0211
2
250
Other Decks in Programming
See All in Programming
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
みんなでプロポーザルを書いてみた
yuriko1211
0
280
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
120
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
990
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
110
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Functional Event Sourcing using Sekiban
tomohisa
0
100
Jakarta EE meets AI
ivargrimstad
0
150
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
Producing Creativity
orderedlist
PRO
341
39k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
What's new in Ruby 2.0
geeforr
343
31k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
KATA
mclloyd
29
14k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Scaling GitHub
holman
458
140k
4 Signs Your Business is Dying
shpigford
180
21k
Automating Front-end Workflow
addyosmani
1366
200k
Designing for Performance
lara
604
68k
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Λར༻͢Δ एׯςετͷੑ࣭͕ҟͳΔ ϒϥβͷͳ͍ϒϥβςετ
·ͱΊ
·ͱΊ ݱ࣮ੈքݫ͍͠ ԿΛॏཁࢹ͢Δ͔ʹΑͬͯɺΞϓϩʔνมΘͬ ͯ͘Δ ؤுͬͯςετॻ͖·͠ΐ͏