Skip to content

VS Code Testing UI Bug, test fail output "═════..." #5353

Closed

Description

@lewinpauli

Describe the bug
When writing a test that is not inside /test folder, the output of a failing test is "═════..." (take a look at the screenshot)

the debug console displays the correct exception

To Reproduce
flutter create

enter the sample code into the test file integration_test/widget_test.dart

hint: the official flutter tutorial for integration tests also creates it inside /integration_test folder
https://docs.flutter.dev/testing/integration-tests#create-the-integration-test-files

and another hint, because this is a flutter vscode bug I was advised to open the issue here
flutter/flutter#159264

Expected behavior
Displaying the correct exception into the vscode ui

Code Sample

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

Future<void> main() async {
  group(
    "integration test",
    () {
      testWidgets("test1", (WidgetTester tester) async {
        await tester.tap(find.byKey(Key("NotExistingKey")));
      });
    },
  );
}

Screenshots
image

Diagnostic Data

  • Operating System and version: Linux Fedora 41 Gnome
  • VS Code version: linux 1.95.3
  • Dart extension version: 3.100.0
  • Dart SDK version: 3.5.4
  • Flutter SDK version: 3.24.5

Activity

  1. DanTup commented on Nov 27, 2024

    @DanTup
    Member

    Thanks, I can reproduce this. It looks like flutter test gives different output for integration tests... We usually show the last print or error message in this popup (excluding any that just say "Test failed, see exception logs above). For the unit tests, the only other print message is the exception text, but in the integration tests we get lots of print messages, ultimately ending with this unhelpful line.

    image

    I'll try to track down why these are different and if we can't change it, we'll have to find a different way to decide what to show here.

  2. added
    in flutterRelates to running Flutter apps
    in testingRelates to test execution of Dart/Flutter tests for end users
    on Nov 27, 2024
  3. added this to the v3.102.0 milestone on Nov 27, 2024
  4. DanTup commented on Nov 27, 2024

    @DanTup
    Member

    This is now fixed:

    image

    If you want to try it out before the next stable release, you can switch to the pre-release extension released just now (v3.101.20241127) in VS Code:

    Dart pre-release versions

  5. lewinpauli commented on Dec 3, 2024

    @lewinpauli
    Author

    @DanTup thank you for this very fast fix :)

  6. DanTup commented on Dec 3, 2024

    @DanTup
    Member

    No problem, thanks for raising the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in flutterRelates to running Flutter appsin testingRelates to test execution of Dart/Flutter tests for end usersis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions