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.2k
営業、広報、開発。 多面的なAIネイティブ化のための 基盤について
timakin
0
210
権限と承認 〜ユーザー信頼性に繋がる管理画面の根幹について〜
timakin
0
920
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時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
180
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
570
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
270
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.2k
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
250
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
110
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
190
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
660
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
210
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
160
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
730
Game over? The fight for quality and originality in the time of robots
wayneb77
1
200
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
490
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
Become a Pro
speakerdeck
PRO
31
6k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The Invisible Side of Design
smashingmag
302
52k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
620
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Navigating Team Friction
lara
192
16k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
720
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
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!!