Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How Go test tests
Search
Seiji Takahashi
December 11, 2017
Programming
2
5.8k
How Go test tests
Presentation for golang.tokyo #11
Seiji Takahashi
December 11, 2017
Tweet
Share
More Decks by Seiji Takahashi
See All by Seiji Takahashi
権限と承認 〜ユーザー信頼性に繋がる管理画面の根幹について〜
timakin
0
590
Go Backends for frontends with GraphQL and gRPC
timakin
6
4.1k
Design Pattern for Image and Text Composition in Go
timakin
5
6.7k
Golang API Testing the HARD way
timakin
13
6.8k
Head First Golang Image Package
timakin
2
10k
React Native Beyond Prototype
timakin
2
1.7k
Performance Optimization on Google AppEngine
timakin
5
6.4k
testcache.pdf
timakin
1
170
How Go cache
timakin
1
110
Other Decks in Programming
See All in Programming
認証・認可の基本を学ぼう前編
kouyuume
0
150
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
140
AIコーディングエージェント(Gemini)
kondai24
0
150
connect-python: convenient protobuf RPC for Python
anuraaga
0
350
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.2k
『実践MLOps』から学ぶ DevOps for ML
nsakki55
2
550
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
260
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
390
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
10
11k
CSC509 Lecture 14
javiergs
PRO
0
220
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
230
React Native New Architecture 移行実践報告
taminif
1
130
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
303
21k
BBQ
matthewcrist
89
9.9k
Navigating Team Friction
lara
191
16k
A better future with KSS
kneath
240
18k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
75
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Bash Introduction
62gerente
615
210k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Why Our Code Smells
bkeepers
PRO
340
57k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Transcript
How Go test tests @__timakin__
• Seiji Takahashi • Github: timakin / Twitter: @__timakin__ •
גࣜձࣾGunosy ৽نࣄۀ։ൃࣨ • Go / Swift ࣗݾհ
Copyright© Gunosy Inc. All Rights Reserved 3 Go / Python
ΤϯδχΞืूத ▶https://gunosy.co.jp/recruit/ Gunosyɺ౦ژେֶʹ௨͏3ਓͷֶੜͷ ʮใΛੈքதͷਓʹ࠷దʹಧ͚͍ͨʯͱ͍͏͍͔Β࢝·Γ·ͨ͠ɻ ౦ূϚβʔζ্ɺຊώϧζͷΦϑΟεҠసΛܦͯɺ େ͖͍ͯ͘͠ΔձࣾͰ׆༂͍ͨ͠ϝϯόʔΛืू͍ͯ͠·͢ɻ
Test of test
None
Go1.9~ ͕ؔͲΜͳग़ྗΛ͢Δͷ͔ɺ ExampleΛఆٛͰ͖ΔΑ͏ʹ
None
None
TestίϚϯυʹؔΘΔ࣮ • src/testing • ςετ࣮ߦ࣌ʹ͏T, BͳͲͷ࣮ • testing.commonͱ͍͏ߏମ͕ϝΠϯϩδοΫΛ͍࣋ͬͯΔ • ίϚϯυͷflagύʔε
• benchmarking, ΧόϨοδଌఆͳͲ • Fail, SkipͳͲͷ࣮
common
None
গͳ͍ʂ؆୯ʂ
Mergeͯ͠΄͍͠ʂ
Can you add tests?
ςετͷ࣮ߦ݁Ռͬͯ Ͳ͏ͬͯ ςετ͢ΔΜͩʁ
ςετͬͯͲ͏ͬͯ ςετ͢ΔΜͩʁ
For testing tests • src/cmd/go/go_test.go • Go commandsͷςετ࣮ߦ
For testing tests • src/cmd/go/go_test.go • Go commandsͷςετ࣮ߦ
For testing tests • testgoData • ͍͍ײ͡ʹfixtureΛಡΈࠐΜͩΓɺ ࣮ߦޙͷCleanupΛͯ͘͠ΕΔ
For testing tests • src/cmd/go/testdata/src/* • ςετ༻ͷFixtureΛఆٛ
all.bashΛճͤ ສࣄOK
Let’s Contribute!
ʕ ◔ϖ◔ʔ < Thank You!!