Skip to content

Test icon change on new run doesn't happen on test_reflective_loader that is not from context menu #5928

Closed

Description

@FMorschel

Describe the bug
After #5904 we should always see gutter icons changing when a new debug session starts, but that is not always the case.

It does work if you use the context menu options from the gutter icon and from the Testing sidebar.

To Reproduce
Steps to reproduce the behavior:

  1. Open pkg/analysis_server/test/src/services/correction/fix/add_static_test.dart in Dart SDK
  2. Run the file with F5
  3. Add a breakpoint on line 23
  4. Run the file with F5 again or by using the code lenses
  5. See the other icons did not update

Expected behavior
For the icons representing the other tests to update.

Screenshots

Image

Please complete the following information:

Workspace Environment
Dart Code extension: 3.129.20260224
Flutter extension: 3.129.20260202 (activated)

App: Visual Studio Code
App Host: desktop
Version: win 1.109.5

Workspace type: Dart (LSP) (Multiroot)
Workspace name: sdk (Workspace)

Dart (3.12.0-edge.265b75c74e46e1a6a1543f261633d92e264082e1): C:\Users\felip_0vh5fa6\dart
Flutter (3.38.7): C:\Users\felip_0vh5fa6\.puro\envs\stable\flutter (No device)

Output from 'dart info'

C:\Users\felip_0vh5fa6\dart\bin\dart.exe info

If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.

General info

  • Dart 3.12.0-edge.265b75c74e46e1a6a1543f261633d92e264082e1 (main) (Mon Feb 23 08:49:29 2026 -0800) on "windows_x64"
  • on windows / "Windows 11 Pro" 10.0 (Build 26200)
  • locale is pt-BR

Process info

Memory CPU Elapsed time Command line
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dartvm.exe

Activity

  1. added this to the v3.130.0 milestone on Feb 25, 2026
  2. added
    in testingRelates to test execution of Dart/Flutter tests for end users
    on Feb 25, 2026
  3. DanTup commented on Feb 25, 2026

    @DanTup
    Member

    I can repro.

    We only queue the tests when the run is triggered through something that we know the test nodes for. When you press F5 we don't have the test nodes, we just run the entire file and then collected nodes from the output.

    I'm not sure if we can reliably know which tests will run this way (for example you might have added a @soloTest). But perhaps we could at least mark the suite as queued (so its icon would change), it would at least give some more info.

    Alternatively we could mark all tests in the suite as queued, but that would be misleading if some tests were not going to run. I'll try them out and see how they look.

  4. FMorschel commented on Feb 25, 2026

    @FMorschel
    ContributorAuthor

    If you dislike your options, we could always simply hide/delete those, right? Since they will be captured again anyway.

  5. DanTup commented on Feb 25, 2026

    @DanTup
    Member

    Alternatively we could mark all tests in the suite as queued, but that would be misleading if some tests were not going to run. I'll try them out and see how they look.

    I'm going with this for now. The skipped tests still send testDone events, so they will change from queued to skipped as they are processed, and at the end of the run any remaining queued tests are reverted anyway. It's possible running from the test runner has this issue anyway (eg. mark a test as skipped, then use the test runner to run the parent node.. it'll still get marked as queued initially).

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 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