Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
エンジニア総出でE2Eテストを自動化した話 / genbaweb01
Search
Yuichi Goto
July 12, 2017
Technology
1
2.1k
エンジニア総出で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
3
430
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
380
Effectで作る堅牢でスケーラブルなAPIゲートウェイ / Robust and Scalable API Gateway Built on Effect
yasaichi
9
2.4k
あるRailsエンジニアがビジネスリーダーに転身するまで
yasaichi
9
3.1k
Active Recordから考える次の10年を見据えた技術選定 / Architecture decision for the next 10 years at PIXTA
yasaichi
50
22k
Active Recordから考える次世代のRuby on Railsの方向性 / Directions for the next generation of Ruby on Rails: From the viewpoint of its Active Record
yasaichi
38
21k
ピクスタのエンジニアリングとCircleCI / Software Engineering with CircleCI at PIXTA
yasaichi
1
470
Ruby on Railsの正体と向き合い方 / What is Ruby on Rails and how to deal with it?
yasaichi
145
93k
Other Decks in Technology
See All in Technology
Ruby で作る大規模イベントネットワーク構築・運用支援システム TTDB
taketo1113
1
260
最近のLinux普段づかいWaylandデスクトップ元年
penguin2716
1
680
生成AI時代の自動E2Eテスト運用とPlaywright実践知_引持力哉
legalontechnologies
PRO
0
220
eBPFとwaruiBPF
sat
PRO
4
2.5k
手動から自動へ、そしてその先へ
moritamasami
0
300
A Compass of Thought: Guiding the Future of Test Automation ( #jassttokai25 , #jassttokai )
teyamagu
PRO
1
250
Kubernetes Multi-tenancy: Principles and Practices for Large Scale Internal Platforms
hhiroshell
0
120
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
世界最速級 memcached 互換サーバー作った
yasukata
0
330
エンジニアリングマネージャー はじめての目標設定と評価
halkt
0
270
MLflowで始めるプロンプト管理、評価、最適化
databricksjapan
1
140
大企業でもできる!ボトムアップで拡大させるプラットフォームの作り方
findy_eventslides
1
700
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
We Have a Design System, Now What?
morganepeng
54
7.9k
Fireside Chat
paigeccino
41
3.7k
The World Runs on Bad Software
bkeepers
PRO
72
12k
How GitHub (no longer) Works
holman
316
140k
Music & Morning Musume
bryan
46
7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
How STYLIGHT went responsive
nonsquared
100
6k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Building Applications with DynamoDB
mza
96
6.8k
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