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
エンジニア総出でE2Eテストを自動化した話 / genbaweb01
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yuichi Goto
July 12, 2017
Technology
2.1k
1
Share
エンジニア総出でE2Eテストを自動化した話 / genbaweb01
Web現場Meetup〜GMOペパボ×ピクスタ〜エンジニアによる技術・組織改善の裏側(2017/07/12)
Yuichi Goto
July 12, 2017
More Decks by Yuichi Goto
See All by Yuichi Goto
[Teaser] Type-Safe Lightweight DDD with Effect Schema
yasaichi
3
530
Google Cloud を用いたソフトウェア開発の内製化組織の早期立ち上げの実現 / Rapid Establishment of In-House Software Development Teams Using Google Cloud
yasaichi
1
1.6k
[EN] Robust and Scalable API Gateway Built on Effect
yasaichi
3
450
Effectで作る堅牢でスケーラブルなAPIゲートウェイ / Robust and Scalable API Gateway Built on Effect
yasaichi
9
2.5k
あるRailsエンジニアがビジネスリーダーに転身するまで
yasaichi
9
3.3k
Active Recordから考える次の10年を見据えた技術選定 / Architecture decision for the next 10 years at PIXTA
yasaichi
50
23k
Active Recordから考える次世代のRuby on Railsの方向性 / Directions for the next generation of Ruby on Rails: From the viewpoint of its Active Record
yasaichi
38
22k
ピクスタのエンジニアリングとCircleCI / Software Engineering with CircleCI at PIXTA
yasaichi
1
480
Ruby on Railsの正体と向き合い方 / What is Ruby on Rails and how to deal with it?
yasaichi
146
95k
Other Decks in Technology
See All in Technology
20260428_Product Management Summit_tadokoroyoshiro
tadokoro_yoshiro
15
18k
GKE Agent SandboxでAIが生成したコードを 安全に実行してみた
lamaglama39
0
200
要件定義の精度を高めるための型と生成AIの活用 / Using Types and Generative AI to Improve the Accuracy of Requirements Definition
haru860
0
310
ハーネスエンジニアリング入門
knishioka
0
130
AIと乗り切った1,500ページ超のヘルプサイト基盤刷新とさらにその先の話
mugi_uno
2
310
サンプリングは「作る」のか「使う」のか? 分散トレースのコストと運用を両立する実践的戦略 / Why you need the tail sampling and why you don't want it
ymotongpoo
3
120
Building Production-Ready Agents Microsoft Agent Framework
_mertmetin
0
160
EMから幅を広げるために最近挑戦していること / Recent challenges I'm undertaking to expand my horizons beyond EM
hiro_torii
1
180
試作とデモンストレーション / Prototyping and Demonstrations
ks91
PRO
0
190
【技術書典20】OpenFOAM(自宅で深める流体解析)流れと熱移動(2)
kamakiri1225
0
370
変化の激しい時代をゴキゲンに生き抜くために 〜ストレスマネジメントのススメ〜
kakehashi
PRO
4
1.1k
新卒エンジニア研修、ハンズオンの設計における課題と実践知/ #tachikawaany
nishiuma
2
130
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3k
Ethics towards AI in product and experience design
skipperchong
2
270
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
490
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Skip the Path - Find Your Career Trail
mkilby
1
110
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
540
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
BBQ
matthewcrist
89
10k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
180
エンジニアに許された特別な時間の終わり
watany
106
240k
Transcript
ΤϯδχΞ૯ग़ͰE2EςετΛ ࣗಈԽͨ͠ Yuichi Goto (@_yasaichi) July 12, 2017 @ WebݱMeetup
self.inspect • ϐΫελגࣜձࣾ ɹ ٕज़ਪਐνʔϜϦʔμʔ • Twitter: @_yasaichi • GitHub:
yasaichi • Blog: http://web-salad.hateblo.jp
ϐΫελͷ͝հ
ձࣾ֓ཁ • ઃཱ: 20058݄25 • ैۀһ: ୯ମ75໊ʢ3݄࣌ʣ • ཧ೦: ΠϯλʔωοτͰϑϥοτͳੈքΛͭ͘Δ
• ࣄۀ༰: PIXTA, fotowaͷӡӦ
https://pixta.jp σδλϧૉࡐͷΦϯϥΠϯϚʔέοτϓϨΠε 6ϲࠃޠల։த
https://fotowa.com ग़ுࡱӨϚονϯάαʔϏε
ຊ
ຊൃදʹ͍ͭͯ • ͢͜ͱ: • ͳͥE2EςετΛࣗಈԽ͢Δඞཁ͕͔͋ͬͨ • ͬͯΑ͔ͬͨ͜ͱɺ৽ͨʹݟ͖͑ͯͨ͜ͱ • ͞ͳ͍͜ͱ: •
E2Eςετʹؔ͢Δٕज़తͳ༰
Agenda എܠͱత ɹ ࣮ࢪ༰ͱՌ ɹ ͬͯΑ͔ͬͨ͜ͱ ɹ ࠓޙͷ՝
PIXTAͷߏ • ෳΞϓϦέʔγϣϯͰߏ • ຊମ: ϞϊϦγοΫͳRailsΞϓϦέʔγϣϯ • ↑͔ΒΓग़ͨ͠ෳͷϚΠΫϩαʔϏε • ओͳϑϨʔϜϫʔΫRailsͰɺࣗಈςετΛ
RSpecͰهड़
Ruby/RailsपΓͷվળͷྺ࢙ • 2015: ৽ଔೖࣾޙͷॳλεΫ͕Ruby 2ܥͷ ɹɹɹɹΞοϓάϨʔυʢʂʣ • 2016: ࣗಈςετߴԽ →
֦ॆ Rails 4ܥΞοϓάϨʔυ • 2017: ٕज़ਪਐνʔϜ݁ ΞοϓάϨʔυ࡞ۀΛϝϯόʔʹҠৡத ࠓͷ͜͜
2016࣌ͷࣗಈςετঢ়گ • Model/Controller spec: ී௨ʹ͋Δ • Request Spec: ͪΐͬͱ͋Δ •
Feature Spec: օແ → ϒϥβ͔Βૢ࡞ͨ࣌͠ʹຊʹಈ͘ͷʁ
Ͳ͏ͳΔ͔ͱ͍͏ͱ… • େنͳϦϦʔεΛߦ͏߹ 1. ςετγφϦΦʢ͍ͬͺ͍ʣΛ༻ҙ 2. ϢʔβʔαϙʔτͷํͳͲʹڠྗΛཁ 3. શһͰ֤γφϦΦΛख࡞ۀͰ֬ೝ =
खಈͰେྔͷE2EςετΛ͍ͯͨ͠
E2EςετΛࣗಈԽ͢Δͧʂ • ݐલ: Ruby/RailsͷΞοϓάϨʔυΛ҆શ͔ͭ ܧଓతʹߦ͍ͬͯͨ͘Ί • ຊԻ: • ຖճଞ෦ॺͱͷௐ͢ΔͷΛΊ͍ͨ •
ख࡞ۀʹΑΔ֬ೝ͕େมͳͷͰΊ͍ͨ
Agenda ɹ എܠͱత ࣮ࢪ༰ͱՌ ɹ ͬͯΑ͔ͬͨ͜ͱ ɹ ࠓޙͷ՝
E2Eςετ߹॓Λ։࠵ • طଘͷςετγφϦΦΛFeature SpecԽ͢Δ • ର: 57γφϦΦ • ظؒ: 2िؒʢ10Ӧۀʣ
• νʔϜϝϯόʔ: 9໊
ϓϩδΣΫτମ੍ਤ E2Eςετ߹॓νʔϜ PM: ࢲ … ΞϓϦέʔγϣϯΤϯδχΞ: 8໊ ΤϯδχΞϦʔμʔ ࢧԉ ϦʔμʔͱϓϩδΣΫτͷ
ؔΘΓʹ͍ͭͯޙ΄Ͳ
Ռ • ظؒʹରγφϦΦશͯΛFeature Specʹ མͱ͠ࠐΈɺmasterʹmergeͰ͖ͨ • Feature SpecΛॻ͖׳Ε͍ͯͳ͍ϝϯόʔͷ εΩϧΞοϓ͕Ͱ͖ͨ →
ܧଓతͳΞοϓάϨʔυͷͨΊͷج൫͕Ͱ͖ͨ
߹॓Ҏ߱ͰͷมԽ • Rails 4ܥͷΞοϓάϨʔυ࣌ͷϓϩηε 1. ࣗಈςετ͕௨ΔΑ͏ʹؤுΔ 2. stagingڥͰ؆୯ͳಈ࡞֬ೝΛ͢Δ → ҎલΑΓ͘ਐΊΒΕΔΑ͏ʹͳͬͨ
Agenda ɹ എܠͱత ɹ ࣮ࢪ༰ͱՌ ͬͯΑ͔ͬͨ͜ͱ ɹ ࠓޙͷ՝
ͨΓલͷ͜ͱ͕େࣄͩͬͨ 1. ࣄલ४උΛͪΌΜͱΔ 2. ࡞ۀʹूதͰ͖ΔڥΛ࡞Δ 3. PMͱͯ͠ଞͷ୭ΑΓʮઈରʹඪΛୡ ͢Δͧʂʯͱ͍͏ؾ࣋ͪΛ࣋ͬͯߦಈ͢Δ
1. ࣄલ४උΛͪΌΜͱΔ • ҎԼΛ߹॓લʹ४උɾڞ༗ • γφϦΦͷׂΓৼΓ • 1γφϦΦͷணखʙmerge·Ͱͷϑϩʔ • Feature
SpecΛॻ࣌͘ͷϧʔϧͱαϯϓϧ • ఆ͞ΕΔ࣭ͱͦͷ͑ɹͳͲ
ϐΫελͰ։ൃؔ࿈ͷ ใڞ༗ʹesaΛར༻
2. ࡞ۀʹूதͰ͖Δڥ࡞Γ • ظؒதͷ։ൃΛࢭΊʢཁௐʣɺׂΓࠐΈ λεΫΤϯδχΞϦʔμʔ͕ରԠ͢Δ • ձٞࣨΛऴିͬͯͦ͜͠Ͱ࡞ۀ͢Δ • ిݯपΓΛඋͯ͠σΟεϓϨΠΛ࣋ͪࠐΉ •
Ίͷ͓ͭΛ࣋ͪدΔ
None
3. PM͕ڧ͍ؾ࣋ͪΛ࣋ͭ • PMʢ= ࢲʣʹ͔͔͍ͬͯͨϓϨογϟʔ • ։ൃΛࢭΊͯߦ͏ͨΊɺ૬Ԡͷ݁ՌΛग़͢ ͜ͱΛίϛοτ͍ͯ͠Δ • ࣗಈԽରͷγφϦΦ͕͚ͬ͜͏ଟ͍
• Feature SpecΛॻ͖׳Εͳ͍ϝϯόʔͷଘࡏ
ٕज़ͱؾ࣋ͪͰϦʔυ͢Δ • ίʔυϨϏϡʔΛߦ͍࣭Λ୲อ͢Δ • ʹͳΓͦ͏ͳՕॴΛઌճΓͯ͠ରࡦ͢Δ • ऴ൫Ͱ٧·͍ͬͯΔϝϯόʔͱϖΞϓϩΛ ߦ͍ٕज़తͳΛղܾ͢Δ PMࣗΒҰ൪Ωπ͍Λղ͖ʹߦ࢟͘ΛݟͤΔ ͜ͱͰϝϯόʔؤுͬͯ͘Εͨʢͱࢥ͏ʣ
Agenda ɹ എܠͱత ɹ ࣮ࢪ༰ͱՌ ɹ ͬͯΑ͔ͬͨ͜ͱ ࠓޙͷ՝
৽ͨͳ՝ • ։ൃΛࢭΊΔͱ͖ͷௐ͕େม • ҙٛΛઆ໌ͯ͠ཧղͯ͠Β͏ྗΛ͢Δ • ՌΛग़͠ଓ͚ͯ৴པஷۚΛ͢Δ • େنϦϦʔε࣌ͷΠϯϑϥ࡞ۀ໘Ͱ ͋ͬͨ͜ͱʹؾͮ͘
ͻͱͭͷΛղܾͨ͜͠ͱͰ ผͷ͕ݟ͖͑ͯͨ
େنϦϦʔεͷݱঢ়ͱࠓޙ • ݱঢ়: ·ͩख࡞ۀ͕ଟ͍ • AWS OpsWorksͷStackΛผʹ1ͭ༻ҙ͢Δ • Route 53ͷΛखಈͰௐ͠Blue/Green
→ ίϯςφٕज़Λ༻͍ͨৗ࣌Blue/GreenσϓϩΠ ࣮ݱʹ͚ٕͯज़ݕূத
Զୡͷઓ͍͜Ε͔Βͩʂ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ ຊൃදͷϒϩά൛: http://texta.pixta.jp/entry/2016/06/15/115000