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
どんなときにテストを書いた方がいいのか/When should you write a test?
Search
Shintani Teppei
June 08, 2020
Programming
1
510
どんなときにテストを書いた方がいいのか/When should you write a test?
Shintani Teppei
June 08, 2020
Tweet
Share
More Decks by Shintani Teppei
See All by Shintani Teppei
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
160
ISUCONで型をつける
euglena1215
1
110
3年でバックエンドエンジニアが5倍に増えても破綻しなかったアーキテクチャ そして、これから / Software architecture that scales even with a 5x increase in backend engineers in 3 years
euglena1215
11
5.2k
モジュラモノリス、その前に / Modular monolith, before that
euglena1215
8
1.1k
いつか使える ObjectSpace / Maybe useful ObjectSpace
euglena1215
2
220
rbs-inlineを導入してYARDからRBSに移行する
euglena1215
1
800
Ruby の型に関する活動をやっている話 / Activities related to Ruby types
euglena1215
3
370
そろそろ理解する includes / Understanding includes
euglena1215
1
930
習うより慣れる Ruby AST / Ruby AST is better to get used to than to learn.
euglena1215
2
620
Other Decks in Programming
See All in Programming
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
160
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
120
Is Xcode slowly dying out in 2025?
uetyo
1
270
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
120
VS Code Update for GitHub Copilot
74th
2
640
Porting a visionOS App to Android XR
akkeylab
0
460
XP, Testing and ninja testing
m_seki
3
240
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
290
#QiitaBash MCPのセキュリティ
ryosukedtomita
1
1.3k
技術同人誌をMCP Serverにしてみた
74th
1
640
Python型ヒント完全ガイド 初心者でも分かる、現代的で実践的な使い方
mickey_kubo
1
110
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
810
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
970
Visualization
eitanlees
146
16k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
A Tale of Four Properties
chriscoyier
160
23k
It's Worth the Effort
3n
185
28k
Gamification - CAS2011
davidbonilla
81
5.4k
Embracing the Ebb and Flow
colly
86
4.7k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Transcript
©2020 Wantedly, Inc. ͲΜͳͱ͖ʹςετΛॻ͍ͨํ͕͍͍ͷ͔ Jun 3, 2020 - Teppei Shintani
@euglena1215 దͳྔͷςετΛॻͨ͘Ίʹ͕ࣗؾΛ͚͍ͭͯΔ͜ͱ ࣾһݚम 2020
©2020 Wantedly, Inc. 5FQQFJ4IJOUBOJ !FVHMFOB w "VUI4RVBE1SFNJVN4RVBE w ৽ଔ w
3VCZ͕͖ ࣗݾհ
©2020 Wantedly, Inc. దͳྔͷςετ
©2020 Wantedly, Inc. ࠓͷΰʔϧ 1VMM3FRVFTUΛ࡞ͬͨͱ͖ʹ దͳྔͷςετΛॻ͚͍ͯΔ͔ ڳʹखΛͯͯߟ͑Δ͜ͱ͕Ͱ͖Δ ͕ࣗߟ͍͑ͯΔ͜ͱΛݴޠԽͯ͠ΈͨͷͰհ͠·͢
©2020 Wantedly, Inc. ͢͜ͱ͞ͳ͍͜ͱ w ͢͜ͱ • ͲΜͳͱ͖ʹςετΛॻ͘ඞཁੑ͕ߴ͍ͷ͔ • ͲΜͳͱ͖ʹςετΛॻ͘ඞཁੑ͕͍ͷ͔
w ͞ͳ͍͜ͱ • ମܥతͳςετख๏ςετͷྨ → ͕ࣗ͋·ΓΒͳ͍ʢ@qnighy ͕ৄͦ͠͏(͠ΒΜ͚Ͳ)ʣ • TDDͳͲͷಛఆͷϓϩάϥϜ։ൃख๏ → ͕ࣗ͋·ΓΒͳ͍ʢ@stomk ͕ৄͦ͠͏(͠ΒΜ͚Ͳ)ʣ
©2020 Wantedly, Inc. ߦͰ·ͱΊΔͱ ςετίʔυͷඞཁੑ มߋසʷ։ൃਓʷॏཁ
©2020 Wantedly, Inc. ςετίʔυͷඞཁੑมߋසº։ൃਓºॏཁ 1. 1ʹ1มߋ͞ΕΔՕॴͳͷ͔ɺ1ʹ1มߋ͞ΕΔՕॴͳͷ͔ 2. มߋස͕͚Εखಈςετͷํ͕ίεύྑ͍Մೳੑ͋Δ 1. ࣗಈςετ
ϥϯχϯάίετ / Πχγϟϧίετ ߴ 2. खಈςετ ϥϯχϯάίετ ߴ / Πχγϟϧίετ w FY JOJUJBMJ[FS CBUDIpMF มߋස͕ߴ͚Εߴ͍΄Ͳ ςετίʔυͷඞཁੑߴ·Δ
©2020 Wantedly, Inc. ςετίʔυͷඞཁੑมߋසº։ൃਓºॏཁ 1. ͦͷϑΝΠϧΛมߋ͢ΔਓͰͳͯ͘ɺͦͷมߋӨڹΛड͚Δ։ൃऀͷਓ 1. app/models/user.rb Λมߋͨ͠Βbackend։ൃͯ͠Δ΄΅શһ͕ӨڹΛड͚ΔՄೳੑ͕ ߴ͍
2. view ΑΓ controller, controller ΑΓ model ͷํ͕ӨڹΛड͚Δ։ൃऀͷਓଟ͘ͳ Γ͕ͪ 3. ։ൃਓ͕1,2ਓͰ͋Ε͋ΔఔѨჴͷݺٵͰ͍͚ͨΓ͢Δ 1. ʮ͜͜Λมߋ͢Δͬͯ͜ͱ͋ͬͪಉ࣌ʹมߋ͠ͳ͍ͱ͜ͷέʔεͰյΕΔͷͰʁʯ 2. ։ൃਓ͕ଟ͘ͳͬͯ͘ΔͱѨჴͷݺٵ͔ͳΓࠔ 3. Χ݄ޙͷࣗผਓͰ͋Δ͜ͱʹҙ
©2020 Wantedly, Inc. ςετίʔυͷඞཁੑมߋසº։ൃਓºॏཁ 1. ͕ͦ͜յΕͨΒͲͷ͘Β͍ࠔΔ͔ 1. Α͋͘ΔࢦඪɿӨڹϢʔβʔɺച্ 1. ࢀߟɿฏͷதʹ1࣌ؒαʔϏε͕μϯ͢ΔͱXXXXສԁఔͷଛࣦ
͜͜ʹ issue URL ͕ೖΔ 2. ͜ΕΒΛ͋ΔఔΧόʔ͍ͯ͠Δͷ͕ SLI/SLO ର endpoint Ұཡ ͜͜ʹ issue URL ͕ೖΔ 1. ͜ͷ endpoint ͕յΕΔՄೳੑͷ͋Δมߋॏཁ͕ߴ͍ͱࢥͬͯࠩ͠ࢧ͑ͳͦ͞͏
©2020 Wantedly, Inc. ςετΛॻ͔ͳ͍͍ͯ͘έʔεʜʁ ྫ͑ϋοΧιϯ มߋසˠϋοΧιϯऴΘͬͨΒϙΠࣺͯͳͷͰ ΄΅
։ൃਓˠdਓ͘Β͍ʁѨჴͷݺٵͰ௨͡Δ ॏཁˠൃදͰόάΒͳ͚Ε0,ɺച্ͳ͍ͷ Ͱۚમμϝʔδ
©2020 Wantedly, Inc. ͏Δͤ͑ɺͪ͜ͱΒϦϦʔεલͳΜ͡Όʂ ࠷খݶͷਖ਼ৗܥͷΈςετॻ͘ Γςετέʔε͚ͩॻ͍ͯ AQFOEJOHlޙͤͨA 1.
࣮ऀҎ֎͕ςετॻ͘ͱ͖ͷSTEP 1. ͲΜͳςετέʔε͕ଘࡏ͢Δͷ͔Ѳ͢Δ ←͕͜͜লུͰ͖Δ͚ͩͰ͔ͳΓخ͍͠ 2. ςετΛॻ͘
©2020 Wantedly, Inc. ߦͰ·ͱΊΔͱ ςετίʔυͷඞཁੑ มߋසʷ։ൃਓʷॏཁ
©2020 Wantedly, Inc. ࠓͷΰʔϧ 1VMM3FRVFTUΛ࡞ͬͨͱ͖ʹ దͳྔͷςετΛॻ͚͍ͯΔ͔ ڳʹखΛͯͯߟ͑Δ͜ͱ͕Ͱ͖Δ