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
COOKPAD and Test Automation
Search
Naoto Takai
May 25, 2014
Programming
19
2.7k
COOKPAD and Test Automation
ソフトウェアテストシンポジウム 2014 東北(JaSST'14 Tohoku)
2014年5月23日(金)
Naoto Takai
May 25, 2014
Tweet
Share
More Decks by Naoto Takai
See All by Naoto Takai
Building the Perfect Custom Keyboard
takai
1
530
キースイッチ潤滑入門 / A Brief Introduction to Lube MX Switches
takai
2
770
みなさん、分かっていますか / What is a difference?
takai
1
860
The Design Philosophy of Kuroko2
takai
3
2.1k
Agile and DevOps with Ruby
takai
2
1k
Software Quality and Testing #1
takai
5
640
Microservices in Action
takai
37
5.3k
Ruby App on Netflix Microservices Stack
takai
6
1k
How We Use Jenkins?
takai
21
8.3k
Other Decks in Programming
See All in Programming
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
230
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
120
受け取る人から提供する人になるということ
little_rubyist
0
250
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
Outline View in SwiftUI
1024jp
1
330
Quine, Polyglot, 良いコード
qnighy
4
650
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
ヤプリ新卒SREの オンボーディング
masaki12
0
130
subpath importsで始めるモック生活
10tera
0
310
Featured
See All Featured
Unsuck your backbone
ammeep
668
57k
Embracing the Ebb and Flow
colly
84
4.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
420
Being A Developer After 40
akosma
87
590k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
A Philosophy of Restraint
colly
203
16k
The Invisible Side of Design
smashingmag
298
50k
What's in a price? How to price your products and services
michaelherold
243
12k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
The Cult of Friendly URLs
andyhume
78
6k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Transcript
ΫοΫύουͱςετࣗಈԽ JaSST’14 Tohoku
ߴҪਓ ΫοΫύουגࣜձࣾ
ࢲͷཤྺॻ ʙ ϝʔΧʔܥൢࣾ ʙ Σϒ੍࡞ձࣾ ʙ େखγεςϜΠϯςάϨʔλʔ
ʙ ωοταʔϏεӡӦձࣾ
ιϑτΣΞ࣭ͱͷग़ձ͍ Σϒ੍࡞ձࣾͰडୗ։ൃʹैࣄ͍ͯͨ͠ ࢲ3VCZͷීٴɾൃలͷͨΊʹେखγε ςϜΠϯςάϨʔλͱస৬ͨ͠ͷ͕ͩɺ ԿͷҼՌ͔ιϑτΣΞඪ४Խ෦ʹଐ ͞ΕΔ͜ͱʹͳͬͨͷͩͬͨʜʜɻ
None
None
݄ؒϢχʔΫϒϥβ ສ ສ ສ ສ ສ
ສ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ 1$ ϞόΠϧ ສ6# ʢ݄ظୈ࢛ظܾࢉิઆ໌ࢿྉʣ
εϚϗΞϓϦྦྷܭ%- ύζυϥ ສɺࠇೣ ສ J04 ສ "OESPJEສ ʢ݄࣌ʣ
ߘϨγϐ ສ ສ ສ ສ ສ ສ ສ ݄ ݄
݄ ݄ ݄ ݄ ݄ Ϩγϐ ສ ʢ݄ظୈ࢛ظܾࢉิઆ໌ࢿྉʣ
ΫοΫύουͷϢʔβʔ உੑ ঁੑ ঁੑ உੑ ੑผ Ҏ্
ҎԼ ҎԼ Ҏ্ ʢঁੑʣ ʢ݄࣌ʣ
. . . . . 2 2 2
2 2 2 2 2 2 2 2 2 2 2 2 ձһࣄۀ ࠂࣄۀ ͦͷଞ ࢛ظച্ߴ ඦສԁʢ࿈݁ʣ ʢ݄ظୈ࢛ظܾࢉิઆ໌ࢿྉʣ
ΞϓϦέʔγϣϯߏʢ8FCʣ MySQL Redis Memcached Unicorn Rails 3.2 Ruby 2.0 nginx
Amazon Web Service Apache
ΞϓϦέʔγϣϯنʢ8FCʣ w Ϟσϧɹɹɹɹɹɹɹʜ Ϋϥε w ίϯτϩʔϥʔɹɹɹʜΫϥε w ϏϡʔςϯϓϨʔτɹʜ ϑΝΠϧ w
ϧʔςΟϯάఆٛɹɹʜ ߦ w 34QFD&YBNQMFɹɹʜ ݸ w σϓϩΠճɹɹɹɹʜճҎ্ʗ ʢ݄࣌ʣ
None
࠷ߴʹ͓͍͍͠ʮνϣίϨʔτέʔΩʯ Ͳ͏ͬͨΒͰ͖Δ͔Λߟ͍͑ͯͩ͘͞ɻ
None
ʮຖͷྉཧΛָ͠Έʹʯ Ͳ͏ͬͨΒͰ͖Δ͔Λߟ͍͑ͯͩ͘͞ɻ
ࣦഊ͢ΔΓํ ָ͠ΈʹͳΔͨΊͷཁ݅Λఆٛ͢Δ ্هΛຬͨ͢ػೳΛઃܭ͢Δ ιϑτΣΞΛ࣮͠ɺςετ͢Δ
ͳࣦͥഊ͢Δͷ͔ʁ ָ͠ΈʹͳΔͨΊͷཁ݅Λఆٛ͢Δ ্هΛຬͨ͢ػೳΛઃܭ͢Δ ιϑτΣΞΛ࣮͠ɺςετ͢Δ ʮଥੑ֬ೝʯͷϓϩηε͕ͳ͍
̫ˍ̫ʢݕূͱଥੑ֬ೝʣ w ݕূ ٬؍తূڌΛఏࣔ͢Δ͜ͱʹΑͬͯɺنఆཁٻࣄ߲ ͕ຬͨ͞Ε͍ͯΔ͜ͱΛ֬ೝ͢Δ͜ͱɻ w ଥੑ֬ೝ ٬؍తূڌΛఏࣔ͢Δ͜ͱʹΑͬͯɺಛఆͷҙਤ͞ Εͨ༻్ຢద༻ʹؔ͢Δཁٻࣄ߲͕ຬͨ͞Ε͍ͯ Δ͜ͱΛ֬ೝ͢Δ͜ͱɻ
̫ࣈϞσϧͱ̫ˍ̫ ଥੑ֬ೝ ཁ݅ఆٛ جຊઃܭ ৄࡉઃܭ ࣮ɾ୯ମςετ ݁߹ςετ γεςϜςετ ड͚ೖΕςετ اը
ධՁ ݕূ
̫ࣈϞσϧͱքʢ༨ஊʣ ൃଆൣғ ཁ݅ఆٛ جຊઃܭ ৄࡉઃܭ ࣮ɾ୯ମςετ ݁߹ςετ γεςϜςετ ड͚ೖΕςετ اը
ධՁ डୗଆൣғ डୗ։ൃͰଥੑ֬ೝ͕ ʹͳΒͳ͍ཧ༝ ਖ਼֬ʹཁ݅ఆٛɾड͚ೖ Εςετൃଆ
ޭ͢ΔΓํ ιϑτΣΞΛ͔ͭͬͯΒ͏ ָ͠Έʹͳ͔ͬͨΛௐΔ Ͳ͏ͬͨΒͬͱָ͠ΈʹͳΔ ιϑτΣΞΛͭ͘ΕΔ͔ߟ͑Δ
σΠϒɾτʔϚεᐌ͘ɺ " 8IFSFEPXFXBOUUPCF # 8IFSFBSFXF $ )PXEPXFJNQSPWFPVSQSPDFTT 5IJTJT"HJMJUZ5IFSFJTOPNPSF
ཁٻຬͷࣄޙੑ ιϑτΣΞ͕ཁٻΛຬ͍ͨͯ͠Δ͔ɺ ιϑτΣΞΛΘͳ͍ͱஅͰ͖ͳ͍ɻ
͠ɺ͓٬͞·ʹΉͷΛฉ͍͍ͯͨΒɺ ͓٬͞·ʮͬͱ͍അ͕ཉ͍͠ʯͱ ͍͑ͯͨͩΖ͏ɻ ϔϯϦʔɾϑΥʔυʦཁग़యʧ
୭͕ސ٬ͳͷ͔͕Θ͔Βͳ͚ΕɺԿ͕ ࣭ͳͷ͔Θ͔Βͳ͍ɻ ΤϦοΫɾϦʔεʰϦʔϯελʔτΞοϓʱ ࣭୭͔ʹͱͬͯͷՁͰ͋Δɻ δΣϥϧυɾϫΠϯόʔάʰιϑτΣΞจԽΛΔ̍ʱ
ߏங͢Δ ܭଌ͢Δ ֶͿ σʔλ ΞΠσΞ ߏஙɾܭଌɾֶशͷϧʔϓ ͜ͷϧʔϓʹཁ͢Δ࣌ؒΛ࠷খԽ͢Δ
ϧʔϓʹཁ͢Δ࣌ؒΛ࠷খԽ͢Δʹʁ ʢʹιϑτΣΞͷͭ͘Γํͷվળʣ
ࣦഊ͢ΔΓํ ։ൃϓϩηεඪ४Λఆٛ͢Δɻ ։ൃϓϩηεඪ४ΛϓϩδΣΫτຖʹ ςʔϥϦϯά͢Δɻ
ͳࣦͥഊ͢Δͷ͔ʁ ։ൃϓϩηεඪ४Λఆٛ͢Δɻ ։ൃϓϩηεඪ४ΛϓϩδΣΫτຖʹ ςʔϥϦϯά͢Δɻ ݱ࣮ͷ։ൃϓϩηεͷվળͰͳ͍
ޭ͢ΔΓํ ϦϦʔεՄೳͳঢ়ଶʹ͢Δ ιϑτΣΞΛ։ൃ͢Δ มߋΛՃ͔͑ͯΒϦϦʔεՄೳͳ ঢ়ଶʹͳΔ·ͰͷແବΛͳ͘͢
ιϑτΣΞੜ࢈ੑ ιϑτΣΞͷੜ࢈ੑΛ্ͤ͞ΔͨΊͷ ޮՌతͳख๏͓Αͦࡾͭʹྨ͞ΕΔɻ w ෦Խʜͭ͘Βͳ͍Α͏ʹ͢Δ w ࣗಈԽʜ͠ͳ͍Α͏ʹ͢Δ w ՄࢹԽʜΘ͔ΔΑ͏ʹ͢Δ
ܧଓతσϦόϦʔ ܧଓతσϦόϦʔιϑτΣΞ։ൃʹ͓ ͚ΔنͷͻͱͭͩɻʜʜܧଓతσϦό ϦʔΛ࣮ݱ͢Δʹɺ։ൃνʔϜ͕ιϑτ ΣΞΛܧଓతʹ౷߹͠ɺ࣮ߦϑΝΠϧΛ Ϗϧυ͠ɺ͞ΒʹͦΕΛࣗಈతʹςετ ͯ͠Λݕग़͢Ε͍͍ɻ IUUQDBQTDUSMRVFKQLENTOSXJLJCMJLJ $POUJOVPVT%FMJWFSZ
ࣗಈςετͱඅ༻ରޮՌʢ༨ஊʣ ςετࣗಈԽ։ൃϓϩηεͷϜμऔΓͰ ͋ΓɺͦͦϜμऔΓʹඅ༻ରޮՌͱ͍ ͏֓೦͏·Εͳ͍ʢΩϦοʣ
σϓϩΠϝϯτύΠϓϥΠϯ ՌϦϙδτϦ όʔδϣϯίϯτϩʔϧ ιʔείʔυ ઃఆ ίϛοτεςʔδ ड͚ೖΕεςʔδ ड͚ೖΕςετ ڥઃఆɺσϓϩΠɺ εϞʔΫςετ
ੑೳςετ ڥઃఆɺσϓϩΠɺ εϞʔΫςετ ຊ൪ڥ ڥઃఆɺσϓϩΠɺ εϞʔΫςετ ίϯύΠϧ ίϛοτςετ Ռ࡞ ίʔυղੳ ڥઃఆ σϓϩΠ εϞʔΫςετ ड͚ೖΕςετ ઃఆ +F[)VNCMFɺ%BWJE'BSMFZʰܧଓతσϦόϦʔʱ
ΫοΫύουͷύΠϓϥΠϯ Source Code Review Continuous Integration Production Test Developement Production
GitHub Git Repository merge pull req pull tag deploy deploy
Developer Machine Redis Shared Development MySQL EC2 Ruby on Rails
memcached Remote Spec Workers remote_spec worker remote_spec worker GitHub Enterprise LAN Tokyo Tyrant Development App Server push rspec deploy HipChat ϩʔΧϧͷ։ൃڥ
։ൃऀʹΑΔςετ 34QFDʹΑΔςετ ୯ମςετπʔϧʹΑͬͯɺσʔλϕ ʔεؚΊͨςετΛ͢Δ $BQZCBSBʹΑΔςετ ը໘ͳ͠ͷΣϒϒϥβΛ༻͍ͯɺ γφϦΦϕʔεͷςετΛ͢Δ
։ൃऀςετɾ2"ςετʢ༨ஊʣ ։ൃऀςετͱ2"ςετରཱతͳ֓೦ Ͱͳ͘ɺςετͷ͋Δଆ໘ʹ͗͢ͳ͍ɻ ྨ͋Γ͖Ͱߟ͑ΔͷͰͳ͘ɺϦϦʔε ·ͰʹԿ͕ඞཁ͔Λߟ͑Α͏ɻ
34QFDͷಛ ;Δ·͍ۦಈ։ൃʢ#%%ʣͷͨΊͷςες ΟϯάϑϨʔϜϫʔΫɻ w σϑΝΫτελϯμʔυͰ͋Δ w ςετίʔυΛߏԽ͍͢͠ w ΤίγεςϜ͕ॆ࣮͍ͯ͠Δ
34QFDʹΑΔςετ describe SymbolStack do ... context 'when stack is empty'
do subject(:empty_stack) { SymbolStack.new } describe '#size' do it { expect(empty_stack.size).to eq 0 } end
$BQZCBSBʹΑΔςετ feature 'User login' do scenario 'successful login' do visit
login_path fill_in 'Login', with: '
[email protected]
' fill_in 'Password', with: 'password' click_link 'Submit' expect(current_path).to root_path end
LAN EC2 CI Server Git Repository Production Test HipChat tag
pull notify deploy Development DB schema Remote Spec distribute Git Repository clone pusher service hook pull push Developer merge ιʔείʔυͷྲྀΕ
ίʔυϨϏϡʔ Team Pull Request Owner Developer Developer review open merge
review ίʔυϨϏϡʔνʔϜ୯ҐͰߦͳ͏͕ɺ શһ͕ϨϏϡʔ͢Δ͜ͱͰ͖Δɻ
None
None
None
None
Repository Product Support Product Manager Issue Developer UI/UX Designer Pull
Request file file review open open (JU)VC&OUFSQSJTFͷར༻ ΤϯδχΞҎ֎ʹσβΠφʔ৬ɺσΟϨ Ϋλʔ৬ɺαϙʔτ৬ͳͲ
LAN EC2 CI Server Git Repository Production Test HipChat tag
pull notify deploy Development DB schema Remote Spec distribute Git Repository clone pusher service hook pull push Developer merge ιʔείʔυͷྲྀΕ
$*αʔόʮ͓Ή͖Μ͢ʯ IUUQTHJUIVCDPNNBTBOPCVJNBJFNPUJPOBMKFOLJOTQMVHJO
$*࣌ؒʹؔ͢Δܦݧଇ ։ൃऀेʹၗຫͳͷͰɺ ͰΠϥΠϥ͠ɺͰΩϨΔɻ
$*Λૣ͘͢Δ ϚϧνϓϩηεԽʢQBSBMMFM@UFTUTʣ ࢄԽ ୈ̍ੈSFNPUF@TQFD ୈ̎ੈSFNPUF@TQFD
ୈ̏ੈ3334QFD
3334QFDͷಛ εϙοτΠϯελϯεΛར༻ ϓϩηεఀࢭ͔Βͷࣗಈ෮ؼ ࣦഊͨ͠ςετͷࣗಈ࠶࣮ߦ ςετ࣮ߦॱংͷ࠷దԽ
͍ςετͷػత࣮ߦ Φʔϓϯιʔε IUUQTHJUIVCDPNDPPLQBESSSTQFDCMPCNBTUFS%&4*(/NE
Master Slave Worker Slave Slave Worker ʜ ʜ DB 3334QFDͷߏ
&YBNQMFʜ εϨʔϒʜ ϫʔΧʔʜฒྻ ࣮ߦ࣌ؒɹʜ
ςετͷ࣭ ػೳͷՁϦϦʔεͯ͠ॳΊͯΘ͔Δ ʹςετʹաͳઌߦࢿͰ͖ͳ͍ w ςετઃܭఔΛಠཱͯ͠ઃ͚ͳ͍ w ։ൃఔͷ͋ͱͷςετఔͳ͍ ຊ൪ڥͰͷμϝʔδίϯτϩʔϧ͕ॏཁ
None
None
None
None
None
σϕϩούʔͱϢʔβʔͷίϛϡχέʔγ ϣϯίϥϘϨʔγϣϯΛ્Ήนͳ͘ͳ ͬͨɻόάͷण໋ɺϲ݄͔Βʹ ॖ͞Εͨɻ ̟ɾΟςΧʔɺ̟ɾΞʔϘϯɺ̟ɾΩϟϩʔϩ ʰςετ͔Βݟ͑ͯ͘ΔάʔάϧͷιϑτΣΞ։ൃʱ
ͱɺ͍͏͓ͩͬͨͷ͞ʜʜ
ϞόΠϧΞϓϦέʔγϣϯ w ΑΓϢʔβʔΤΫεϖϦΤϯε͕ॏཁʹ w Ϧονͳ6*ɺෳࡶͳঢ়ଶͷςετ w ΞϓϦέʔγϣϯσϦόϦʔ͕࠶೩ w ෳόʔδϣϯ͕ซଘ w
ϦϦʔεϑϩʔͷ࠶ߏங w ϦϦʔεظؒɺςετϑΣʔζ
෮श ສճʹճɺສԁ͕ͨΔεϩοτϚ γϯ͕͋Δͷͱ͠·͢ɻ͜ͷεϩοτϚ γϯͰ༡Ϳͱ͖ɺճ͋ͨΓ͍͘Βίετ Λ͔͚Δ͖͔ߟ͍͑ͯͩ͘͞ɻ
·ͱΊ w ϢʔβʔͷཁٻɺϦϦʔεͯ͠ॳΊͯ ͔Δɻ w ߏஙɾܭଌɾֶशͷϧʔϓʹཁ͢Δ࣌ؒ Λ࠷খԽ͠ͳ͚ΕͳΒͳ͍ɻ w ϦϦʔε·ͰͷϓϩηεΛఆٛ͠ɺͦ͜ ͔ΒແବΛऔΓআ͘ɻ