Skip to content

Prevent setup/teardown methods showing as runnable tests #4286

Closed

Description

@DanTup

Setup/teardown methods currently show as runnable tests:

image

This is a little confusing, and trying to run them will fail. VS Code lets us use TestTags to restrict profiles, so we should be able to restrict the Run/Debug profile to "runnable tests" and then only set that tag on runnable tests.

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    in testingRelates to test execution of Dart/Flutter tests for end users
    on Nov 29, 2022
  2. added this to the v3.54.0 milestone on Nov 29, 2022
  3. Wdestroier commented on Dec 5, 2022

    @Wdestroier

    Might not be related to this change, but after some extension or VSCode update the test results and the Run | Debug buttons are not showing anymore. I suspect the behavior may be related to this change.

    Before the update:
    image

    After the update:
    image

    Dart Code extension version: v3.54.1

    About VSCode:
    Version: 1.70.0 (user setup)
    Commit: da76f93349a72022ca4670c1b84860304616aaa2
    Date: 2022-08-04T04:38:16.462Z
    Electron: 18.3.5
    Chromium: 100.0.4896.160
    Node.js: 16.13.2
    V8: 10.0.139.17-electron.0
    OS: Windows_NT x64 10.0.22000

    /cc @DanTup

  4. DanTup commented on Dec 5, 2022

    @DanTup
    MemberAuthor

    @Wdestroier I don't think it's related to this, as those CodeLens links are separate to the test runner integration (they're been around a lot longer than the test runner).

    Could you file a new issue about this, and verify whether you can repro it in a newly created project that you could share so I can have the exact same contents? Can you also include the exact version of Dart/Flutter you're using? Thanks!

  5. added a commit that references this issue on Sep 2, 2025
    119acb3
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 bugis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions