Skip to content

Individual tests do not show until opening the test file #1876

@Austinpayne

Description

@Austinpayne

Describe the bug

I recently started having an issue where individual tests in the test panel do not show up unless I have previously opened the test file they are found in. Only the top level suite (or sometimes just the test target) appear. This is reproducible in the swift-nio repo. For example, notice how the NIOBase64Tests do not enumerate until I open the test file, even after having built the project and ran all tests.

Image Image

Aside: I have not (intentionally) opted into pre-releases of the plugin but the version I am running does not match the latest 2.10.0 tag here in the repo. Not sure what that is about.

To Reproduce
Steps to reproduce the behavior:

  1. Clone and open swift-nio: https://github.com/apple/swift-nio
  2. Note that individual tests don't enumerate after package resolution
  3. Build/run all tests, e.g. cmd+; a
  4. Note that individual tests still don't enumerate
  5. Open a test file (e.g. Tests/NIOBase64Tests.swift)
  6. Note that the tests from that file now enumerate

Expected behavior

Individual tests show up in the test panel, similar to how it used to work. Apologies, I don't have those versions handy, I just know that recently (within the last week) I noticed this change of behavior.

Environment

  • OS: macOS Sequoia 15.7
  • Swift version: swift-driver version: 1.120.5 Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
  • Visual Studio Code version: 1.104.3
  • vscode-swift version: 2.11.20250806

Additional context

I am able to reproduce this with Swift 6.2 as well, inside a swift:noble dev-container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Unscreened

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions