Assertions in Dart and Flutter tests: an ultimate cheat sheet

Tests are essential for ensuring any software quality. Whether you are creating unit, widget, or integration tests for Flutter applications, the end goal of any test is asserting that the reality matches the expectations. Here is an ultimate cheat sheet for assertions in Dart and Flutter tests with many details explained!

Assertions in Dart and Flutter tests β€” an ultimate cheat sheet

➑ download high-res image β¬…

Each of the items in this cheat sheet is discussed in greater detail in this series:

Check the official website for the overall approach to testing Flutter apps.

All the code is available on GitHub or in the interactive Zapp.

Tune in for the Flutter Global Summit on February 7, 2023 to watch a video presentation of this cheat sheet. Attendance is free!

Originally published at Invertase blog. Check out their awesome Authors Program!

Hi! πŸ‘‹πŸ» I’m Anna, Google Developer Expert in Flutter from Ukraine πŸ‡ΊπŸ‡¦ Follow me on Twitter, GitHub, YouTube, Medium to get notifications about my latest work.

It’s early 2023, and we in Ukraine are still fighting against russians committing genocide on our lands. If you find this content useful and have a coin to spare, support us with your donations. Stand with Ukraine!

--

--

Anna Leushchenko πŸ‘©β€πŸ’»πŸ’™πŸ“±πŸ‡ΊπŸ‡¦
Flutter Community

Google Developer Expert in Dart and Flutter | Author, speaker at tech events, mentor, OSS contributor | Passionate mobile apps creator