Skip to content

Consider migrating to VSCode's integration test scaffolding #3737

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
firelizzard18 opened this issue Mar 29, 2025 · 2 comments
Open

Consider migrating to VSCode's integration test scaffolding #3737

firelizzard18 opened this issue Mar 29, 2025 · 2 comments
Labels
chore/testing issues related to bugs in test, CI setup

Comments

@firelizzard18
Copy link
Contributor

firelizzard18 commented Mar 29, 2025

vscode-go uses extension/test/runTest.ts to execute integration tests. Consider migrating to @vscode/test-cli and .vscode-test.js (or .mjs/.cjs). Looking at runTest.ts, I think it should be feasible. The only part I see that might be tricky is the two separate test runs, other than that everything looks pretty straightforward. I am interested in trying this myself.

vscode-go's integration test setup is a little janky. It executes two different sets of tests (two calls to runTest); if all the tests in the second run pass, it's not obvious whether any tests in the first run failed because I have to scroll to the ~middle of the output (which is quite long) to find the report from the first run. Also the Testing UI is very convenient but vscode-go's setup seems to confuse it.

@gopherbot gopherbot added this to the Untriaged milestone Mar 29, 2025
@findleyr
Copy link
Member

findleyr commented Apr 7, 2025

CC @h9jiang.

You are referring to https://github.com/microsoft/vscode-test-cli, right?
I'm not experienced with vscode-go's integration test, but would not be surprised if they are using outdated patterns or libraries. I defer to Hongxiang for prioritization.

@findleyr findleyr modified the milestones: Untriaged, vscode-go/backlog Apr 7, 2025
@findleyr findleyr added the chore/testing issues related to bugs in test, CI setup label Apr 7, 2025
@firelizzard18
Copy link
Contributor Author

You are referring to https://github.com/microsoft/vscode-test-cli, right?

Yes, but more generally the instructions here.

I'm not experienced with vscode-go's integration test, but would not be surprised if they are using outdated patterns or libraries.

There's already a pretty strong correspondence between how we're running integration tests now and what the page I linked suggests so on paper it looks like a small change. I tried to do this myself and ran into strange failures. When I executed the tests via npm run <script> (I forget the exact name of the script) I got an error in mocha, but when I tried to debug, it just "process exited with code ..." without hitting any useful breakpoints. I followed their guide (the 'normal'/non-advanced process) but clearly there are some issues. My next step would be to start from scratch and get a single test to work their way, and then migrate bit by bit until I figured out what broke it. I would link my work in a branch but it appears that I discarded it. I don't think this needs to be a priority, it's just a minor developer experience thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore/testing issues related to bugs in test, CI setup
Projects
None yet
Development

No branches or pull requests

3 participants