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
How Go test tests
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Seiji Takahashi
December 11, 2017
Programming
7.1k
2
Share
How Go test tests
Presentation for golang.tokyo #11
Seiji Takahashi
December 11, 2017
More Decks by Seiji Takahashi
See All by Seiji Takahashi
権限と承認 〜ユーザー信頼性に繋がる管理画面の根幹について〜
timakin
0
800
Go Backends for frontends with GraphQL and gRPC
timakin
6
4.2k
Design Pattern for Image and Text Composition in Go
timakin
5
6.8k
Golang API Testing the HARD way
timakin
13
7k
Head First Golang Image Package
timakin
2
10k
React Native Beyond Prototype
timakin
2
1.7k
Performance Optimization on Google AppEngine
timakin
5
6.6k
testcache.pdf
timakin
1
200
How Go cache
timakin
1
120
Other Decks in Programming
See All in Programming
ファインチューニングせずメインコンペを解く方法
pokutuna
0
220
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.5k
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
130
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
150
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
500
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
310
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.7k
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
110
Nuxt Server Components
wattanx
0
220
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
1.4k
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
170
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
290
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
280
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
240
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
140
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
Code Reviewing Like a Champion
maltzj
528
40k
Faster Mobile Websites
deanohume
310
31k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
250
For a Future-Friendly Web
brad_frost
183
10k
Unsuck your backbone
ammeep
672
58k
Context Engineering - Making Every Token Count
addyosmani
9
780
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!!