Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
How Go test tests
Search
Seiji Takahashi
December 11, 2017
Programming
7.5k
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による実践
timakin
5
4.7k
AIエージェントのデータガバナンスの最新事情。そしてプロダクトのAIファースト化
timakin
0
3.9k
営業、広報、開発。 多面的なAIネイティブ化のための 基盤について
timakin
0
290
権限と承認 〜ユーザー信頼性に繋がる管理画面の根幹について〜
timakin
0
1.1k
Go Backends for frontends with GraphQL and gRPC
timakin
6
4.3k
Design Pattern for Image and Text Composition in Go
timakin
5
6.9k
Golang API Testing the HARD way
timakin
13
7.4k
Head First Golang Image Package
timakin
2
10k
React Native Beyond Prototype
timakin
2
1.7k
Other Decks in Programming
See All in Programming
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
250
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.8k
[2026-10-09]一枚の布で作らなくてもいい。 信頼性は「パッチワーク」で紡がれる~既存の運用と新しい可能性をつなぎ合わせてきたCREの話~
tosite
0
110
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
3
1.3k
Modernizing iOS Apps
seyfoyun
0
120
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.2k
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
200
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
190
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
180
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
150
phperだってパンチカードでコーディングしたい
o0h
PRO
0
470
Vue Fes Japan の “作る側”に関わってみて
naokihaba
1
190
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
41k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Building an army of robots
kneath
307
47k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
410
The Limits of Empathy - UXLibs8
cassininazir
2
730
Marketing to machines
jonoalderson
1
5.9k
We Are The Robots
honzajavorek
0
410
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
320
Agile that works and the tools we love
rasmusluckow
331
22k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
580
Ethics towards AI in product and experience design
skipperchong
2
440
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
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!!