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
テストはじめました.pdf
Search
tiking
August 22, 2020
1
150
テストはじめました.pdf
tiking
August 22, 2020
Tweet
Share
More Decks by tiking
See All by tiking
デザインシステムっていいな
tiking76
0
160
GraphQL 入門
tiking76
0
1.3k
みんなTCAって 知ってる?ver2.0
tiking76
1
310
みんなTCAって知ってる?
tiking76
0
900
最近きてるかもって思ってるデザイン
tiking76
0
230
Swiftのちょっとうれしい構文
tiking76
0
66
p1assさんを作ろうと試みました
tiking76
0
120
PRのときに使われがちな略語のやつ
tiking76
0
94
swiftでもグラフ書いてみたくない??
tiking76
0
190
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
41
9.2k
Six Lessons from altMBA
skipperchong
26
3.4k
Ruby is Unlike a Banana
tanoku
96
11k
BBQ
matthewcrist
85
9.2k
Designing Experiences People Love
moore
138
23k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
How to train your dragon (web standard)
notwaldorf
87
5.6k
KATA
mclloyd
29
13k
Transcript
テストはじめました Zli×CA合同LT 2020/08/22 tiking
Readme name : 舘佳紀 colleage : 会津大学学部3年 さーくる : Zli所属です
Handlename : チキング 好きな言語 swift twitter @tikin0716 gitHub tiking76
みなさんテスト書いてますか??
テストってどんなのがあるの??
テストを書くことのメリット • 動作する綺麗なコードが書ける • もしバグが見つかってとしてテストがすぐに教えてくれるので、原因の特定がしやす く修正時間が短くなり手戻りが最小になります。 • 開発サイクル無いで常に動作保証があるので、安心して開発を進められる。 • 責務の切り分けが容易になる
今回やっていくのは 単体テストと機能テスト
単体テスト 単体テスト(ユニットテスト)は、一つのメソッドもしくは一つのクラスのテストを指します。 開発者の設計した通りに動くかを確認するテスト 開発者がテストを行います
実際にやってみた
機能テスト 機能テストは機能が仕様通りにきちんと動作しているかのテストを指します。 要件通りに動くかを確認するテストで、ユーザーもしくはビジネス要件を引き出し何をつく るを決定する役割の人が行うテストです。
モックオブジェクト 技法 テストのために、 インターフェースは本物と同じで中 身だけ偽物のオブジェクトを使う。
DI(Dependency Injection) : 依存性の注入 依存性をもったオブジェクトを外部からわた すこと。 デザインパターンの一種。
実際にやってみた
やってみての感想 ・テストって案外ハードル低いんだ… ・テストを意識して書いているとリファクタリングしやすいことが大きな気づきになった。
LT駆動開発最高!!
参考になりました ・さわって学べる! iOSテスト駆動開発 - shindyu - BOOTH ・単体テストのハジメ ・猿でも分かる! Dependency
Injection: 依存性の注入
ここまでありがとうございました