Skip to content

Test count metrics #3741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
finestructure opened this issue Mar 26, 2025 · 0 comments
Open

Test count metrics #3741

finestructure opened this issue Mar 26, 2025 · 0 comments

Comments

@finestructure
Copy link
Member

We added test target metrics a while ago and discussed ideas around further test metrics.

One of these was a test count.

Concerning this, Paul LeMarquand from the Swift Testing working group suggested to use lsp-server to index a project's tests and then query it for the number of tests it found. This would work for both XCTest and Swift Testing tests/targets and should give exactly the same results as seen in Xcode or VS Code.

The LSP server would be sent a workspace/_synchronize request to start indexing, followed by a workspace/tests request for the test hierarchy. (Full request spec)

We’d also want to disable background indexing in sourcekit-lsp, which would let the workspace/_pollIndex command kick off indexing once and then stop watching the workspace when it finishes.

One option to interface with LSP would be a client package like LanguageClient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant