-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
Unable to run extension test from command line when vscode-insider is open #112793
Comments
@bpasero are you an owner of https://github.com/microsoft/vscode-test ? |
We never supported to run the tests from the command line when VSCode is running. You can simply run tests from the debug viewlet in that case. I think @connor4312 would be the new owner of extension test running. To my knowledge nothing has changed in this area. An easy way to find out is to use Code stable to test with @ankitbko |
@bpasero The documentation states running test through CLI from insider version is possible. Is that not the case? I also found microsoft/vscode-test#57 which also seems to suggest the same. |
@ankitbko yeah it is possible but not from within VSCode. |
@bpasero I am kinda confused. Can you confirm if it is possible to run the extension tests through command line while vscode-insider is open? If so, can you share how to run the test when vscode insider is open? If not, we may want to update the document. The thing is it used to work till few days ago. So I am not sure if it was incidental that it worked earlier of if this is actually a bug. If it is a but I would be grateful if someone else can also try to reproduce the same. |
@ankitbko you can run extension tests from the command line provided that NO instance of VSCode is running. I am not sure how to improve the message further, it currently says: "Running extension tests from the command line is currently only supported if no other instance of Code is running" How would you change that? And since you indicate it worked before, can you do the same steps using Code stable and not insiders. |
@bpasero It never worked with Code stable but worked with insiders. I was talking about improving the documentation, not the error message. The current FAQ in documentation implies that running from command line while VSCode stable is open does not work and suggests to download insider to get it working. The wording - "You can either use VS Code Insiders for development or launch the extension test from the debug launch config that bypasses this limitation." gives the impression it is either-or scenario. |
@ankitbko ah! yeah I get it now, running insiders and launching tests from stable is indeed something that should work. but if an extension for example suddenly decides to use proposed API I think we would automatically run the tests against insiders version. So maybe that changed recently in the PR extension? |
I would start by apologizing for making this confusing. I am new to VSCode extension development so am unaware of the history and I am getting too confused by docs and issues open regarding this. So thank you @bpasero for patiently being with me.
So it is possible to run test from command line while insider is open? I always used to run tests against insider VSCode as PR extension uses proposed API. So I used to open PR extension repo in VSCode-insider and run the tests against VSCode-insider through command line. I also used to have VSCode stable open but that had some different project and nothing to do with the PR extension. Also I found microsoft/vscode-test#58 which allows this scenario for some reason. |
The rule is that you cannot run extension tests from the command line if the instance to run the tests against is opened. But it should be possible to run tests against stable when insiders is open. What do you see if you do that? |
ah.. now I get it. I never ran against stable when insider was open as extension is using proposed api. Will the other way also work - Run tests against insider from stable terminal? But thank for clarification. Weirdly it was working earlier and sudden change surprised me. We should definitely mention this clearly on the doc.. perhaps have some sort of truth table on what scenario works. |
Yeah any way works (stable, insiders) as long as the tests execute in a version that is not running already, I can update the docs end of month to make this clearer. |
I just pushed microsoft/vscode-docs@8f9f070 to our docs which hopefully makes this clearer. |
Version: 1.53.0-insider (user setup)
Commit: c927a80
Date: 2020-12-18T05:27:48.567Z
Electron: 11.0.5
Chrome: 87.0.4280.88
Node.js: 12.18.3
V8: 8.7.220.29-electron.0
OS: Windows_NT x64 10.0.19042
Unable to run test through CLI if vscode-insider is open. This was working just yesterday and then I updated the insider and it stopped working.
Steps to Reproduce:
yarn install
andyarn test
.Get below error -
Edit: Can confirm this is also happening in samples present in vscode-test repo. You will need to first comment all the
runTests
except for the 'insider' one. It seems this only happens on insider version.The text was updated successfully, but these errors were encountered: