Testing Fundamentals of Flutter [Course]

We have some very exciting testing news to share! A few months ago, our teammate Jorge developed a comprehensive Lesson on Flutter Testing for Caster.IO.

February 11, 2021
February 11, 2021
updated on
April 19, 2024
Guest Contributor

We have some very exciting testing news to share! A few months ago, our teammate Jorge developed a comprehensive Lesson on Flutter Testing for Caster.IO. While Caster.IO has since ceased operations, we are very fortunate to be the new home for hosting Jorge’s Flutter testing content. The best part is: it’s now free! 

We are very excited to make this content available to the developer community because we strongly believe that testing is a crucial part of the development process. It can make or break your application — lack of tests or offloading testing to a separate development team could lead to low-quality applications and last minute scrambles to squash bugs before launch. In contrast, integrating testing into the development process can increase confidence in your codebase and ensure that your app is able to ship at any point. This course will provide a nice foundation for Flutter developers looking to learn the fundamentals of testing, or serve as a handy reference for more experienced developers.

We plan to release the full course in three batches over the next few weeks according to the below schedule. You can view all of the content on this YouTube playlist.

Testing Fundamentals of Flutter Tutorial Schedule

Week 1

Lesson 1: What is the difference between unit testing, widget testing, and integration testing? 

Lesson 2: Writing your first unit test 

Lesson 3: Running your test from the terminal

Lesson 4: The structure of a good test

Lesson 5: Using expect() in your tests

Lesson 6: All you need to know about Matchers

Lesson 7: Grouping your tests using the group() function

Lesson 8: Testing code that throws an Error or an Exception

Lesson 9: Sharing code between tests with setUp() and tearDown()

Week 2

Lesson 10: Testing Futures

Lesson 11: Testing Streams

Lesson 12: Writing your first widget test

Lesson 13: The difference between pumpWidget(), pump(), and pumpAndSettle()

Lesson 14: Finding a widget in your widget tree using CommonFinders

Lesson 15: Interacting with your widgets using WidgetTester

Lesson 16: Verifying your widget tests using a Matcher from flutter_test

Lesson 17: Testing smaller widgets in isolation

Week 3

Lesson 18: Controlling the behavior of your dependencies using mockito

Lesson 19: Stubbing synchronous methods with mockito

Lesson 20: Stubbing asynchronous methods with mockito

Lesson 21: Verifying interactions with mockito

Lesson 22: Using golden files to verify pixel-perfect widgets

Lesson 23: Collecting code coverage from your tests

Lesson 24: Running integration tests with flutter_driver

Lesson 25: Taking automated screenshots of your application

Lesson 26: Running your tests on GitHub Actions

Lesson 27: Using Codemagic for your CI/CD needs

Ready to learn more? Read our Very Good Guide to Flutter Testing.

More Stories