英文:
ASK Flutter Integration test with Patrol
问题
我尝试学习如何在Flutter中编写完全自动化的测试。在我的情况下,我有3个不同版本的应用(开发、演示和生产),并且一些模块需要与操作系统本身进行一些本地集成,比如打开Web浏览器等。我尝试了一些不同的模块,比如<https://patrol.leancode.co/>和<https://pub.dev/packages/honey>。我发现我可以使用的最好的工具是Patrol。但是我仍然在使用Patrol时遇到了一些问题:
- 这个测试并不是完全自动化的,一些操作可能会失败,需要手动输入。
- 一些设备可能会失败,特别是在Gradle构建中的Android模拟器,而iPhone在版本应用中从不起作用。查看图像描述
你们能帮助我或者给我一些关于如何以正确的方式在Patrol中实现集成测试的建议吗?
英文:
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:
- this test is not fully automated some actions may fail and need manual input.
- 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
得分: 1
我是Bartek,我在LeanCode的Patrol部门工作。
这个测试不是完全自动化的,有些操作可能会失败,需要手动输入。
Patrol被设计成一个完全自动化的测试工具。您必须以一种不需要测试人员/开发人员干预的方式编写您的测试,除了运行patrol test
命令。虽然有可能编写等待测试人员执行某些操作的测试,但我不建议这样做,因为您将无法在持续集成上运行这些测试,这意味着您不会从中获得太多好处。
一些设备可能会失败,特别是gradle构建中的Android模拟器,iPhone从不与app一致的情况下也不能工作。
请分别为这些问题创建一个单独的问题,可以在SO/Patrol的GitHub问题页面上提出。在这个过程中,请运行patrol test --verbose
以获得更多输出,以帮助诊断出现了什么问题。
我建议您从Android开始,因为它更容易设置,而且确保您彻底完成了本地自动化设置指南。很多人在这个过程中都会犯一些错误,所以您并不孤单。
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论