0

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: enter image description here

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.

1
  • Did you ever progress on this issue? I am facing the same limitation. Commented Sep 24, 2022 at 11:28

3 Answers 3

1

I guess it might be not an answer to your question, but I'm running our Flutter web integration tests via "flutter drive..." in GitHub CI on BuildJet Ubuntu runner in Chrome. CORS is turned off for Flutter Chrome & WebServer with this awesome package "flutter_cors".

chromedriver --port=4444 & sleep 5 &&
flutter drive --driver=test_driver/integration_test.dart \
--target=integration_test/foo_test.dart \
-d web-server
Sign up to request clarification or add additional context in comments.

Comments

0

I believe you have created a support ticket with BrowserStack, I will be sure to get back to you on that shortly.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
0

As per tech support from both BrowserStack and Sauce Labs, testing Flutter web apps is not currently supported and there are no active plans to move in that direction. :-( Maybe someone will post a creative solution here with port forwarding or the legacy Flutter web driver (not integration driver).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.