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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
エンジニア総出で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
580
Google Cloud を用いたソフトウェア開発の内製化組織の早期立ち上げの実現 / Rapid Establishment of In-House Software Development Teams Using Google Cloud
yasaichi
1
1.7k
[EN] Robust and Scalable API Gateway Built on Effect
yasaichi
3
480
Effectで作る堅牢でスケーラブルなAPIゲートウェイ / Robust and Scalable API Gateway Built on Effect
yasaichi
9
2.5k
あるRailsエンジニアがビジネスリーダーに転身するまで
yasaichi
9
3.4k
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
490
Ruby on Railsの正体と向き合い方 / What is Ruby on Rails and how to deal with it?
yasaichi
147
95k
Other Decks in Technology
See All in Technology
SmartHR Engineering Team Deck
smarthr
1
3.4k
AIに持続⼒を与える 判断の⻑期記憶設計
eiei114
1
640
AIで変わるエンジニアの働き方(仮)
naoinaoi
0
390
Flutter × BLE Centralを自前Pluginで実装する設計パターン - MethodChannel / EventChannelで作る双方向ブリッジの実践 / Building Custom Flutter BLE Central Plugins: Bidirectional Bridging with Method & Event Channels
bitkey
PRO
0
230
LLM・AIエージェントシステムベストプラクティス
shibuiwilliam
6
1.6k
属人化を叩き割れ!「制作加速」と「安定化」の矛盾を打破する:8年目プロダクトが辿り着いた「ミスが起こり得ない」アセット制作フローの全貌
gree_tech
PRO
0
120
ガバメント AI 源内を地方自治体は活用できるのか可能性と課題、期待について
takeda_h
2
470
ハッカソンで入賞した話 @ Findy LT
asari194617
0
1.5k
:syncing_time:
sksat
2
340
Sets in Go
ramalho
1
1.2k
VLMで2.3万枚のPyCon JP写真を検索!
terapyon
1
260
What's new in Go 1.27?
ciarana
0
300
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
660
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
390
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
420
Designing for humans not robots
tammielis
254
26k
New Earth Scene 8
popppiees
3
2.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Test your architecture with Archunit
thirion
2
2.4k
Unsuck your backbone
ammeep
672
58k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
210
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
470
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
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