Flutter Community
Published in

Flutter Community

Blazing Fast Driver Tests - made easy

Photo by Nynne Schrøder on Unsplash

TL;DR You can now write fast driver tests with much less amount of code using this package.

A note of warning: if you are in a Flutter project that won’t take more than 3 months, you won’t need an extensive testing approach, therefore you won’t need the approach that I suggest in this post.

But. . .

If you work in a Flutter project that will take a long time, I would strongly advise investing in testing, and that includes:

Flutter Driver Tests

I’ve mentioned that Flutter Driver Tests have its issues:

  • Require iOS/Android device
  • Slower than Widget Tests
  • Dependency Injection is problematic
  • Tests depending on the outcomes of the previous tests
  • Running one test file at a time
  • Difficult to debug failing tests

Fortunately, I’ve mentioned that those issues can be solved. . .

Unfortunately, it would have taken you a lot of code to do that.

What if, there were a command-line tool that could do the majority of work for you?

Yes, there is — why else would I write this article?!

We’ve released a package that does most of the work for you. In my company, we are using this package internally, but I would love to hear your feedback on any feature requests.

A very small percentage of people may experience a seizure when exposed to certain visual images, including flashing lights or patterns that may appear in video games. Even people who have no history of seizures or epilepsy may have an undiagnosed condition that can cause these “photosensitive epileptic seizures” while playing those Flutter Driver Tests.

There is still work to be done (hard to write UI tests for a command-line tool) but please, report bugs, submit Pull Requests, try out the example or just give me feedback on how do you like it.

--

--

--

Articles and Stories from the Flutter Community

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tomek Polański

Tomek Polański

Passionate mobile developer. One thing I like more than learning new things: sharing them

More from Medium

Flutter Architectural Patterns, State Management & Flutter Declarative

Exploring Inherited Widget in Flutter

Building a Calorie Tracker App in Flutter!

Firebase Storage — Flutter 💙💛