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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Seiji Takahashi
December 11, 2017
Programming
7.4k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How Go test tests
Presentation for golang.tokyo #11
Seiji Takahashi
December 11, 2017
More Decks by Seiji Takahashi
See All by Seiji Takahashi
AIエージェントのデータガバナンスの最新事情。そしてプロダクトのAIファースト化
timakin
0
3.6k
営業、広報、開発。 多面的なAIネイティブ化のための 基盤について
timakin
0
230
権限と承認 〜ユーザー信頼性に繋がる管理画面の根幹について〜
timakin
0
940
Go Backends for frontends with GraphQL and gRPC
timakin
6
4.2k
Design Pattern for Image and Text Composition in Go
timakin
5
6.9k
Golang API Testing the HARD way
timakin
13
7.2k
Head First Golang Image Package
timakin
2
10k
React Native Beyond Prototype
timakin
2
1.7k
Performance Optimization on Google AppEngine
timakin
5
6.7k
Other Decks in Programming
See All in Programming
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
100
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.7k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
370
Vite+ Unified Toolchain for the Web
naokihaba
0
740
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
340
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
190
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
150
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
360
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
200
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
170
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
800
Featured
See All Featured
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
460
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
420
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
340
Game over? The fight for quality and originality in the time of robots
wayneb77
1
220
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
Typedesign – Prime Four
hannesfritz
42
3.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
190
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
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!!