我试图根据以下示例使用波动驱动程序编写一些集成测试: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.
谢谢您能给我的任何想法。
答案 0 :(得分:0)
您能否检查是否设置了可能覆盖正在运行的目标文件 flutter drive
的 Xcode 构建配置?我发现 similar issue 和设置风格对他们进行了集成测试。