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
Flutterテストことはじめ
Search
takattata
May 31, 2018
Programming
1
820
Flutterテストことはじめ
@Flutter Meetup Tokyo #2
#flutter_meetup_tokyo
takattata
May 31, 2018
Tweet
Share
More Decks by takattata
See All by takattata
What's DDD?
takattata
5
910
Kotlinのコントリビュートに挑戦してみたよ!
takattata
3
300
導入画面を実装したよ
takattata
1
2k
AndroidXに移行しようと`してみた`!
takattata
2
720
Flutter
takattata
3
1.6k
ディープリンクを実装した
takattata
1
1.9k
introduce unit testing
takattata
1
580
xUnit Test Patterns の序章
takattata
1
370
プロジェクトの1ファイルに単体テストを書いてみた!〜本当にこれで合ってるの…??🤔〜
takattata
0
2.3k
Other Decks in Programming
See All in Programming
開発生産性を上げるための生成AI活用術
starfish719
3
1.6k
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
180
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
1
470
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
140
Range on Rails ―「多重範囲型」という新たな選択肢が、複雑ロジックを劇的にシンプルにしたワケ
rizap_tech
0
6.7k
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
130
チームの境界をブチ抜いていけ
tokai235
0
210
ALL CODE BASE ARE BELONG TO STUDY
uzulla
27
6.6k
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.4k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
370
One Enishi After Another
snoozer05
PRO
0
140
Six and a half ridiculous things to do with Quarkus
hollycummins
0
210
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
4.9k
Docker and Python
trallard
46
3.6k
Optimizing for Happiness
mojombo
379
70k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
A designer walks into a library…
pauljervisheath
209
24k
How STYLIGHT went responsive
nonsquared
100
5.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Unsuck your backbone
ammeep
671
58k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Transcript
Flutter テストことはじめ Flutter Meetup Tokyo #2 @takattata #flutter_meetup_tokyo
Takasy (高島 友里) @takattata アプリエンジニア (iOS/Android) Swift/Kotlin ままのて
導入:質問です! Flutterのテスト 書いたこと ありますか?
導入 新しくやり始めた時は ひとまずテストを書いてみたくなる病 ※とはいえテストに詳しい訳ではない
テストの種類 1. Unit testing 2. Widget testing 3. Integration testing
スライド全体の参照: Testing Flutter Apps 1 2 3 大きく3種類
・外部の依存関係にはモックを使う ・読み書き、UI、ユーザーのアクションは範囲外 ・目的:様々な条件下でロジック部分の正確性を検証すること Unit testing Unit package: flutter_test
Widget testing ・1つのウィジェットをテストする ・ユーザーのアクション、レイアウト、子のウィジェットを作れる 環境で行なう ・目的:ウィジェットのUIが期待通りに見え、やりとりするのを確 認すること Widget package: flutter_test
Integration testing ・シミュレータで実行する ・アプリのパフォーマンス検証もできる ・Espresso, UI Automation etc… => Flutter
Driver ・目的:アプリが正しく機能していること、構成する全てのウィ ジェットが期待通りに統合されていること Integration package: flutter_driver
GitHub: Flutter gallery Flutter Galleryの テストコードを見てみよう!
Unit testing ↑ロジックはこのクラスにある
Unit testing
Widget testing ~Stateの内容 ・validate掛ける ・personにsetStateで設定 ・見た目作る
Widget testing ↓CommonFinders
Widget testing この上でnameFieldに#を入れてる
乞うご期待 Integration testing 学んだことはブログに書くと思います
良きテストライフを!