Back to Browse

Flutter: Add Unit Tests to Your App

36.7K views
Jul 27, 2018
16:22

Full source code on GitHub: https://github.com/bizz84/coding-with-flutter-login-demo Sign up here for more videos: https://codewithandrea.com/ Flutter & Firebase Udemy Course (with discount code): https://www.udemy.com/course/flutter-firebase-build-a-complete-app-for-ios-android/?referralCode=EA358EC9B7765B6B6F19 In this video I show how to extract business logic from your apps into testable classes, and write unit tests in Flutter. This is based on my Firebase authentication demo. Highlights: 00:00 - Intro 01:48 - Review of TextFormField form validation 03:40 - Extract email and password validation code into separate classes 08:10 - Write simple unit tests 13:16 - Detecting and fixing failing tests 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. For a more in-depth coverage of unit & widget testing, see my Flutter & Firebase course: https://codewithandrea.com/courses/flutter-firebase/ Thanks for watching!

Download

0 formats

No download links available.

Flutter: Add Unit Tests to Your App | NatokHD