I'm trying to run integration tests of a Flutter web (not Android/iOS) app on a hosted device farm like BrowserStack or Sauce Labs. It seems that the Flutter driver or integration tester are only designed to run on the local machine you're testing on. They require a custom driver for the browser and that driver doesn't seem able to connect to a remote browser. Has anyone found a way through port forwarding or something clever to overcome this limitation? Or does the device farm host have to run the Flutter driver themselves?
The ability to run automated tests on a variety of browsers and devices is critical to CI/CD and it seems odd that Flutter doesn't support this short of managing your own device farm.
A screenshot of flutter drive -h
:
We can't use a regular Selenium grid/driver because Flutter is rendering to a canvas or SVG through shadow dom elements which makes it pretty infeasible to drive with traditional HTML/CSS selectors.