Flutter: Deep Dive with Widget Tests and Mockito

Video Channel
Please help us to find bad videos. Broken or unappropriated video content?
Full source code on GitHub:
Sign up here for more videos: /
Flutter & Firebase Udemy Course (with discount code):
In this video I cover widget tests in depth.
This will give you a solid understanding about testing in Flutter, so that you can ensure your widgets behave as expected.
This is based on my Firebase authentication demo, which I have covered in my previous videos.
Highlights:
00:17 - Overview of Widget tests: what they are and what they are used for
02:06 - Widget tests in the Flutter Sample Demo App: WidgetTester, Finder, and matcher objects explained
05:15 - Explanation of WidgetTester.pump().
08:00 - How to write Widget tests for a login screen
10:45 - Resolving problems with MediaQuery
14:45 - Introduction to test mocks, and how to write one
19:18 - Introduction to mockito as a powerful tool to mock objects
21:53 - From Acceptance Criteria to Widget Tests, in detail
22:40 - Finding widgets by key
24:10 - Write expectations with mockito
25:40 - Detecting callbacks
28:40 - How to enter text into a widget
31:15 - Use mocks to return values and throw errors
35:33 - Wrap up
Notes:
- I'm using the iOS simulator, but you can open the Android emulator and run the same code.
- To run the code on the demo, follow the instructions on the project README file to setup your own Firebase instance.
If you need any help, just ask in the comments. I'll be happy to help.
Feedback and suggestions on new tutorials are very welcome!
This code was written with Flutter Beta 0.5.1, and is tested to work with Dart 2.
Thanks for watching!
Mdp.lt is not the owner of this text/video/image/photo content, the real source of content is Youtube.com and user declared in this page publication as Youtube.com user, if you have any question about video removal, what was shared by open community, please contact Youtube.com directly or report bad/not working video links directly to video owner on Youtube.com. Removed video from Youtube.com will also be removed from here.