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
540
キースイッチ潤滑入門 / A Brief Introduction to Lube MX Switches
takai
2
780
みなさん、分かっていますか / What is a difference?
takai
1
870
The Design Philosophy of Kuroko2
takai
3
2.1k
Agile and DevOps with Ruby
takai
2
1.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
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
4
540
命名をリントする
chiroruxx
1
410
快速入門可觀測性
blueswen
0
360
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
From Translations to Multi Dimension Entities
alexanderschranz
2
130
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
460
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
130
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
480
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
return文におけるstd::moveについて
onihusube
1
1.1k
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
The Art of Programming - Codeland 2020
erikaheidi
53
13k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Thoughts on Productivity
jonyablonski
67
4.4k
Optimising Largest Contentful Paint
csswizardry
33
3k
Building Adaptive Systems
keathley
38
2.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Speed Design
sergeychernyshev
25
670
4 Signs Your Business is Dying
shpigford
181
21k
Gamification - CAS2011
davidbonilla
80
5.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Side Projects
sachag
452
42k
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 ϦϦʔε·ͰͷϓϩηεΛఆٛ͠ɺͦ͜ ͔ΒແବΛऔΓআ͘ɻ