There is code is place to read the original flat representation format of workspace/tests but this has now been replaced by a hierarchical view that is closer in format to how tests are represented in VSCode.
LSPTestDiscovery.getWorkspaceTests returns an intermediary format. You can probably avoid this and merge the response directly into the test list. Anyway the intermediary format is too restrictive for swift-testing.
There is code is place to read the original flat representation format of
workspace/tests
but this has now been replaced by a hierarchical view that is closer in format to how tests are represented in VSCode.The request should be called from
TestExplorer. discoverTestsInWorkspace
https://github.com/swift-server/vscode-swift/blob/dfba3243e6cb97faa45037d11478e2714d4d5e17/src/TestExplorer/TestExplorer.ts#L170-L180. This is called at initialisation and after every compile, where a test file has been changed. Currently the LSP request call is commented out.LSPTestDiscovery.getWorkspaceTests
returns an intermediary format. You can probably avoid this and merge the response directly into the test list. Anyway the intermediary format is too restrictive for swift-testing.