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
Seiji Takahashi
December 11, 2017
Programming
2
5.4k
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
270
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
160
How Go cache
timakin
1
100
Other Decks in Programming
See All in Programming
SODA - FACT BOOK(JP)
sodainc
1
9.1k
AsyncSequenceとAsyncStreamのプロポーザルを全部読む!!
s_shimotori
1
220
業務でAIを使いたい話
hnw
0
220
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
170
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
4
17k
マンガアプリViewerの大画面対応を考える
kk__777
0
440
Introducing RemoteCompose: break your UI out of the app sandbox.
camaelon
2
290
品質ワークショップをやってみた
nealle
0
820
Towards Transactional Buffering of CDC Events @ Flink Forward 2025 Barcelona Spain
hpgrahsl
0
120
Claude Agent SDK を使ってみよう
hyshu
0
1.5k
CSC509 Lecture 08
javiergs
PRO
0
270
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
1.4k
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
Producing Creativity
orderedlist
PRO
348
40k
GitHub's CSS Performance
jonrohan
1032
470k
Thoughts on Productivity
jonyablonski
72
4.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
How to Think Like a Performance Engineer
csswizardry
27
2.2k
Facilitating Awesome Meetings
lara
57
6.6k
[RailsConf 2023] Rails as a piece of cake
palkan
57
6k
Site-Speed That Sticks
csswizardry
13
940
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.7k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
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!!