gpt4 book ai didi

Flutter 集成测试无法运行

转载 作者:行者123 更新时间:2023-12-05 07:32:04 26 4
gpt4 key购买 nike

我正在尝试使用基于此处示例的 flutter 驱动程序编写一些集成测试:https://flutter.io/testing/ .我能够让应用程序部署,但我得到的只是等待应用程序响应。我真的不确定还能做什么,因为它只是坐着等待。这是我在终端中看到的。

 flutter drive --target=test_driver/home_category_list_scroll.dart
Using device Sampson's iPhone.
Starting application: test_driver/home_category_list_scroll.dart
Automatically signing iOS for device deployment using specified
development team in Xcode project: QDCF25JLN2
Running pod install... 7.2s
Starting Xcode build...
├─Assembling Flutter resources... 13.0s
└─Compiling, linking and signing... 7.5s
Xcode build done. 27.6s
Installing and launching...
flutter: Observatory listening on http://127.0.0.1:54774/
00:00 +0: scrolling performance test (setUpAll)
[info ] FlutterDriver: Connecting to Flutter application at
http://127.0.0.1:54270
[info ] FlutterDriver: Waiting for application to start
[info ] FlutterDriver: Waiting for application to start
[info ] FlutterDriver: Waiting for application to start

这是测试的前几行。

void main() {
group('scrolling performance test', () {
FlutterDriver driver;

setUpAll(() async {
// Connects to the app
driver = await FlutterDriver.connect(dartVmServiceUrl: 'http://127.0.0.1:54270');
});

tearDownAll(() async {
if (driver != null) {
// Closes the connection
driver.close();
}
});

test('measure', () async {

Flutter Doctor 输出:

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v0.5.8-pre.56, on Mac OS X 10.13.4 17E202, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
[✓] Android Studio (version 3.0)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] IntelliJ IDEA Community Edition (version 2017.1.6)
[!] VS Code (version 1.24.1)
[✓] Connected devices (1 available)

! Doctor found issues in 1 category.

谢谢你给我的任何想法。

最佳答案

您能否检查是否设置了可能覆盖目标文件 flutter drive 正在运行的 Xcode 构建配置?我找到了一个 similar issue并设置口味为他们进行集成测试。

关于Flutter 集成测试无法运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51486884/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com