Skip to content

UI integration tests not run on a remote device #89

@GuillaumeMorinQc

Description

@GuillaumeMorinQc

I'm trying to use flutter integration tests on a remote arm64 device. When I launched the following command the application is deployed and launched, but when it time to run tests nothing happens for 12 minutes.
The application is the default app with counter and button to increment it.

flutter-arm test integration_test/app_test.dart  -vv --disable-service-auth-codes -d imx8mm
[  +48 ms] executing: uname -m
[  +21 ms] Exit code 0 from: uname -m
[        ] x86_64
[   +9 ms] executing: [/home/dev/sdk/flutter-elinux/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +5 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 097d3313d8e2c7f901932d63e537c1acefb87800
[        ] executing: [/home/dev/sdk/flutter-elinux/flutter/] git tag --points-at 097d3313d8e2c7f901932d63e537c1acefb87800
[  +12 ms] Exit code 0 from: git tag --points-at 097d3313d8e2c7f901932d63e537c1acefb87800
[        ] 2.10.2
[  +35 ms] executing: [/home/dev/sdk/flutter-elinux/flutter/] git rev-parse --abbrev-ref HEAD
[   +2 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] HEAD
[        ] executing: [/home/dev/sdk/flutter-elinux/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +3 ms] Exit code 128 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] fatal: HEAD does not point to a branch
[  +20 ms] Unable to locate an Android SDK.
[ +129 ms] Found plugin integration_test at /home/dev/sdk/flutter-elinux/flutter/packages/integration_test/
[  +44 ms] Found plugin integration_test at /home/dev/sdk/flutter-elinux/flutter/packages/integration_test/
[  +28 ms] Found plugin integration_test at /home/dev/sdk/flutter-elinux/flutter/packages/integration_test/
[  +57 ms] Found plugin integration_test at /home/dev/sdk/flutter-elinux/flutter/packages/integration_test/
[   +6 ms] Found 1 files which will be executed as Integration Tests.
[   +4 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +14 ms] Artifact Instance of 'ELinuxEngineArtifacts' is not required, skipping update.
[  +19 ms] executing: ping -w 500 -c 1 192.168.2.227
[  +28 ms] PING 192.168.2.227 (192.168.2.227) 56(84) bytes of data.
           64 bytes from 192.168.2.227: icmp_seq=1 ttl=62 time=0.997 ms

           --- 192.168.2.227 ping statistics ---
           1 packets transmitted, 1 received, 0% packet loss, time 0ms
           rtt min/avg/max/mdev = 0.997/0.997/0.997/0.000 ms
[   +4 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +9 ms] Artifact Instance of 'ELinuxEngineArtifacts' is not required, skipping update.
[  +73 ms] Skipping pub get: version match.
[  +30 ms] Found plugin integration_test at /home/dev/sdk/flutter-elinux/flutter/packages/integration_test/
[  +74 ms] Found plugin integration_test at /home/dev/sdk/flutter-elinux/flutter/packages/integration_test/
[  +21 ms] Generating /workspaces/flutter-elinux-imx8mm-devcontainer/hello_world/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[ +147 ms] running test package with arguments: [-r, compact, --timeout, 30s, --concurrency=1, --chain-stack-traces, --, /workspaces/flutter-elinux-imx8mm-devcontainer/hello_world/integration_test/app_test.dart]
00:00 +0: loading /workspaces/flutter-elinux-imx8mm-devcontainer/hello_world/integration_test/app_test.dart                                                                                                                [ +146 ms] test 0: starting test /workspaces/flutter-elinux-imx8mm-devcontainer/hello_world/integration_test/app_test.dart
[   +8 ms] Stopping scan for flutter_test_config.dart; found project root at /workspaces/flutter-elinux-imx8mm-devcontainer/hello_world
[        ] test 0: starting test device
[   +2 ms] test 0: awaiting connection to test device
[  +17 ms] Uninstall hello_world from imx8mm.
[        ] executing: true
[   +3 ms] Uninstallation Success
[   +1 ms] Install hello_world (build/elinux/arm64/debug/bundle) to imx8mm
[        ] executing: rsync --archive --delete build/elinux/arm64/debug/bundle/ [email protected]:/home/root/hello_world/
[ +183 ms] Installation Success
[        ] Launch hello_world.name on imx8mm
[ +559 ms] Observatory URL on device: http://127.0.0.1:43085/9cWL_Sot1GM=/
[   +1 ms] executing: ssh -o ExitOnForwardFailure=yes -L 127.0.0.1:43085:127.0.0.1:43085 [email protected] echo connected;bash
[ +128 ms] Forwarded host port 43085 to device port 43085 for Observatory
[   +2 ms] test 0: Connecting to vm service
[  +11 ms] test 0: Observatory uri is available at http://127.0.0.1:43085/9cWL_Sot1GM=/
00:01 +0: loading /workspaces/flutter-elinux-imx8mm-devcontainer/hello_world/integration_test/app_test.dart                                                                                                                [ +484 ms] test 0: Finding the correct isolate with the integration test service extension
12:00 +0 -1: loading /workspaces/flutter-elinux-imx8mm-devcontainer/hello_world/integration_test/app_test.dart [E]                                                                                                         
  TimeoutException after 0:12:00.000000: Test timed out after 12 minutes.
  package:test_api/src/backend/invoker.dart 333:28  Invoker._handleError.<fn>
  dart:async/zone.dart 1418:47                      _rootRun
  dart:async/zone.dart 1328:19                      _CustomZone.run
  package:test_api/src/backend/invoker.dart 331:10  Invoker._handleError
  package:test_api/src/backend/invoker.dart 287:9   Invoker.heartbeat.<fn>.<fn>
  dart:async/zone.dart 1426:13                      _rootRun
  dart:async/zone.dart 1328:19                      _CustomZone.run
  package:test_api/src/backend/invoker.dart 286:38  Invoker.heartbeat.<fn>
  dart:async-patch/timer_patch.dart 18:15           Timer._createTimer.<fn>
  dart:isolate-patch/timer_impl.dart 395:19         _Timer._runTimers
  dart:isolate-patch/timer_impl.dart 426:5          _Timer._handleMessage
  dart:isolate-patch/isolate_patch.dart 192:12      _RawReceivePortImpl._handleMessage
  
12:00 +0 -1: Some tests failed.                                                                                                                                                                                            
[+718637 ms] test package returned with exit code 1
[   +9 ms] "flutter test" took 720,875ms.
[   +5 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      TestCommand.runCommand (package:flutter_tools/src/commands/test.dart:472:7)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1161:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #4      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #10     main (package:flutter_elinux/executable.dart:83:3)
           <asynchronous suspension>
           
           
[   +4 ms] ensureAnalyticsSent: 0ms
[        ] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1

There is the result of my flutter-arm doctor :

[✓] Flutter (Channel unknown, 2.10.2, on Debian GNU/Linux 11 (bullseye) 5.10.102.1-microsoft-standard-WSL2, locale en_US.UTF-8)
    • Flutter version 2.10.2 at /home/dev/sdk/flutter-elinux/flutter
    • Upstream repository unknown
    • Framework revision 097d3313d8 (7 weeks ago), 2022-02-18 19:33:08 -0600
    • Engine revision a83ed0e5e3
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] eLinux toolchain - develop for embedded Linux devices
    • clang version 9.0.1 (https://github.com/llvm/llvm-project c1a0a213378a458fbea1a5c77b315c7dce08fd05)
    • cmake version 3.15.3
    • pkg-config version 0.29.2

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (3 available)
    • eLinux (desktop) • elinux-wayland • flutter-tester • Debian GNU/Linux 11 (bullseye) 5.10.102.1-microsoft-standard-WSL2
    • eLinux (desktop) • elinux-x11     • flutter-tester • Debian GNU/Linux 11 (bullseye) 5.10.102.1-microsoft-standard-WSL2
    • eLinux (mobile)  • imx8mm         • flutter-tester • i.MX8 (Hydrogen-Tritium) 2.10.2 - 0.0.0.22052.2

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 3 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions