Chapter 11. Testing Flutter apps

This chapter covers

  • Writing Dart unit tests
  • Mocking HTTP calls
  • Writing Flutter widget tests
  • Writing Flutter integration tests with Flutter drive
  • Accessibility widgets in Flutter

In the roughly 100 interviews I’ve endured in my life, one of the most common questions the interviewer asks is, “What kind of testing do you do at your current job?” Trying to mask my inadequacy with humor, and hoping that the interviewer will just forget they care about testing code and move on, I always say, “Not as much as we should.” Which can be translated to “Not at all!” The only feeling of comfort I get from that is knowing that I’m not alone. (And, for the record, it’s never worked.)

The reason they ask about that, I think, ...

Get Flutter in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.