2

Currently in my project I am adding multiple integration tests separated in different files. When trying to run all tests running using flutter test integration test, it gives me this error when moving between tests

Error waiting for a debug connection: The log reader stopped unexpectedly, or never started. TestDeviceException(Unable to start the app on the device.)

This error never occurs when running it on an iOS or Android emulator, but as this is a desktop application, I need to get the tests building on Linux which is where the error is occurring.

Hugo
  • 21
  • 1

2 Answers2

0

maybe this can help you:

sdk version . choose win 11 sdk(10.0.22000.0) in visual studio installer windows 11 need choose win 11 sdk(10.0.22000.0)

https://github.com/flutter/flutter/issues/93635#issuecomment-969053206

Gülsen Keskin
  • 657
  • 7
  • 23
0

I haven't been able to get my desktop integration tests to work with a single command but if I write each test out as its own command, it works:

flutter test integration_test/features/fast_booking/fast_booking_test.dart --dart-define=FLAVOR=staging --dart-define=FLUTTER_TEST=true;flutter test integration_test/features/appointments/book_appointment_test.dart --dart-define=FLAVOR=staging --dart-define=FLUTTER_TEST=true

It's not the prettiest solution and I'm hoping the Flutter team releases an official solution.

Related Issues

Most of these are Windows specific but they don't solve the problem on MacOS.

Code on the Rocks
  • 11,488
  • 3
  • 53
  • 61