ASK Flutter Integration test with Patrol

1.4k Views Asked by At

I try to learn how to write full automation tests in Flutter. in my case, I have 3 flavor apps (Development, Staging, and Production), and some modules need some native integration with OS itself like opening a web browser, etc. I try some different modules, like https://patrol.leancode.co/ and https://pub.dev/packages/honey. I found that the best tool that I can use is Patrol. but I still have issues with patrol:

  1. this test is not fully automated some actions may fail and need manual input.
  2. some devices will fail especially the android simulator in the gradle build and iPhone never works with the flavor app.enter image description here

can you guys help me or give some advice on how I implement the integration test with patrol in the proper way?

1

There are 1 best solutions below

1
On

I'm Bartek and I work on Patrol at LeanCode.

this test is not fully automated some actions may fail and need manual input.

Patrol is designed to be a fully-automated testing tool. You have to write your test in a way that does not require any interaction from the tester/developer, apart from running the patrol test command. It's possible to write test that waits for a human tester to perform some action, but I don't recommend doing that, because you won't be able to run these tests on CI, meaning you won't benefit much from them.

Some devices will fail especially the android simulator in the gradle build and iPhone never works with the flavor app.

Please create a separate question on SO/issue on Patrol's GitHub for both each of these issues separately. While doing so, please run patrol test --verbose to get much more output that will help diagnose what went wrong.

I recommend you start with Android because it's easier to set up, and make sure you thoroughly completed the native automation setup guide. A lot of people make mistakes in this process, so you're not alone :)