Skip to content

Add option to provide location information when listing tests #5601

@adam-fowler

Description

@adam-fowler

Description

When you run swift --list-tests it just provides a list of tests. It would be really useful for the Visual Studio Code swift extension if we could have an option to output more information about the tests, specifically which file they are in and location within that file.

eg
swift --list-tests --extended could return a JSON file

[
   {
        "name": "MyModuleTests/TestName/testName", 
        "file": "Tests/MyModuleTests/TestName.swift",
        "line": 45
    },
    {
    ...
    },
]

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

No response

Swift Package Manager version/commit hash

No response

Swift & OS version (output of swift --version && uname -a)

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions