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
Yuichi Goto
July 12, 2017
Technology
1
1.9k
エンジニア総出でE2Eテストを自動化した話 / genbaweb01
Web現場Meetup〜GMOペパボ×ピクスタ〜エンジニアによる技術・組織改善の裏側(2017/07/12)
Yuichi Goto
July 12, 2017
Tweet
Share
More Decks by Yuichi Goto
See All by Yuichi Goto
[Teaser] Type-Safe Lightweight DDD with Effect Schema
yasaichi
1
110
Google Cloud を用いたソフトウェア開発の内製化組織の早期立ち上げの実現 / Rapid Establishment of In-House Software Development Teams Using Google Cloud
yasaichi
1
870
[EN] Robust and Scalable API Gateway Built on Effect
yasaichi
3
240
Effectで作る堅牢でスケーラブルなAPIゲートウェイ / Robust and Scalable API Gateway Built on Effect
yasaichi
8
1.8k
あるRailsエンジニアがビジネスリーダーに転身するまで
yasaichi
8
2.8k
Active Recordから考える次の10年を見据えた技術選定 / Architecture decision for the next 10 years at PIXTA
yasaichi
50
21k
Active Recordから考える次世代のRuby on Railsの方向性 / Directions for the next generation of Ruby on Rails: From the viewpoint of its Active Record
yasaichi
38
20k
ピクスタのエンジニアリングとCircleCI / Software Engineering with CircleCI at PIXTA
yasaichi
1
400
Ruby on Railsの正体と向き合い方 / What is Ruby on Rails and how to deal with it?
yasaichi
143
90k
Other Decks in Technology
See All in Technology
AWSを活用したIoTにおけるセキュリティ対策のご紹介
kwskyk
0
270
人はなぜISUCONに夢中になるのか
kakehashi
PRO
6
1.7k
AI Agent時代なのでAWSのLLMs.txtが欲しい!
watany
2
160
EDRの検知の仕組みと検知回避について
chayakonanaika
8
4.2k
Active Directory攻防
cryptopeg
PRO
8
4.9k
OPENLOGI Company Profile for engineer
hr01
1
20k
Apache Iceberg Case Study in LY Corporation
lycorptech_jp
PRO
0
250
LINEギフトにおけるバックエンド開発
lycorptech_jp
PRO
0
180
ホワイトボードチャレンジ 説明&実行資料
ichimichi
0
140
短縮URLをお手軽に導入しよう
nakasho
0
130
プロダクトエンジニア構想を立ち上げ、プロダクト志向な組織への成長を続けている話 / grow into a product-oriented organization
hiro_torii
1
330
分解して理解する Aspire
nenonaninu
2
690
Featured
See All Featured
Speed Design
sergeychernyshev
27
800
Documentation Writing (for coders)
carmenintech
67
4.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
640
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
The Cult of Friendly URLs
andyhume
78
6.2k
How STYLIGHT went responsive
nonsquared
98
5.4k
We Have a Design System, Now What?
morganepeng
51
7.4k
4 Signs Your Business is Dying
shpigford
182
22k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
360
Site-Speed That Sticks
csswizardry
4
400
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
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