Automation testing for Flutter app in complex environment

23 views Asked by At

Currently I'm facing a challange related to test automation and new application written in Flutter. The existing project setup:

  • micro-frontends (with different tech stacks, mostly Vue)
  • micro-services
  • Test automation for the micro-frontends is mostly done on the low level (using jest and cypress)
  • Some test automation is done on end to end level with Selenide (+Java) so in general using DOM to fetch elements
  • Auth0 used between all of those services

As I mentioned above, we want to introduce Flutter application that will be used on Web as well as on Native applications (flutter will be integrated into existing app).

My problem is that when it comes to test coverage I'm not sure how to approach the integration between Flutter and the rest of the Web environment. The functional tests would be done with flutter/dart and it's testing libraries provided, but I think I need one or two happy path tests to verify the integration between all of the web components (redirects on Apache, Auth0 login being propagated correctly, services being called properly after deployment on the environment).

I've looked into:

  • using existing Selenide + Java setup - but there is no DOM to use, since Flutter is drawing the page on canvas. I could only verify if the url is proper
  • using image recognition within Selenide to find referenced image (like a snapshot of a button) and use it to click - but the libraries used have vulnerabilities and were created in 2014, so I'm not comfortable using that (security team will kill me), using something like OpenCV seems to be an overkill (if it even can be done)
  • using shadow DOM for tests - but it's not providing any useful information

If possible I would rather not introduce another tool (like Appium with Appium-flutter-driver), but if it's the only way I might need to give it a go. Would it work similar to Selenium (aka. opening page, browsing it using DOM, then when you're on the Flutter app you can use the appium-flutter-driver to browse the Flutter canvas to interact with 'elements'?)

Am I left with manual testing only? We have had instances where Auth0 caused problems while switching between applications and I've also had instances when services were called correctly when application was running locally, but after deployment it was no longer the case, that's why I was looking into having some very simple testing on the super high level.

0

There are 0 answers