简体   繁体   English

如何在设备上跟踪 Flutter UI Android Studio 测试执行?

[英]How can I follow Flutter UI Android Studio test execution on device?

I wrote a Flutter Widget plugin with user interface automated testing using Android Studio based on Flutter documentation .我根据Flutter 文档使用 Android Studio 编写了一个带有用户界面自动化测试的 Flutter Widget 插件。

Tests execute properly but are quite abstract to write without following what happens on the device UI.测试正确执行,但编写起来非常抽象,无需遵循设备 UI 上发生的情况。 All I see is that the test executes properly and the duration.我所看到的只是测试正确执行和持续时间。 The device is plugged and works properly but shows nothing related to the tests.设备已插入并正常工作,但未显示与测试相关的任何内容。

Is there a way to execute the UI tests from Android Studio and follow the execution on the device UI to simplify the writing of UI tests?有没有办法从 Android Studio 执行 UI 测试并跟踪设备 UI 上的执行,以简化 UI 测试的编写?

I would like to avoid using a solution based on screenshots as it would not be convenient to have to continuously open an image to follow what is happening.我想避免使用基于屏幕截图的解决方案,因为必须不断打开图像以跟踪正在发生的事情是不方便的。

As explained in the Flutter documentation , there are 3 types of tests:正如Flutter 文档中所解释的,有 3 种类型的测试:

  • Unit单元
  • Widget小工具
  • Integration一体化

Integration testing is the one that allows following the test execution on a device or a simulator.集成测试是一种允许在设备或模拟器上跟踪测试执行的测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM