You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support running extension tests from command-line when same flavour of vscode is open #137678
As described in #112793, you can't run extension tests from the command-line if the flavour of VSCode needed to run the tests is already open (stable/insiders).
Using the command-line for testing (rather than debug launch from inside VSCode) is often important in more complex projects that might have multiple test suites and where not every development workflow involves having VSCode actually open.
The limitation makes testing a bit more inconvenient:
If you really want to test against insiders so that automated tests catch problems quickly then you can't also use insiders as your normal IDE so that the human developer notices other kinds of problems.
Even if you don't mind which version you test against, you either need to get your whole team to standardise on the other flavour for their development, or you need to make it a parameter that can be configured when they run the tests.
None of these are absolute blockers, but the limitation certainly adds friction.
I wonder if we should do this by default, set the user data and extension dirs to ${dir}-test. It would also prevent user settings or extensions from interfering with tests, which they can easily do.
Activity
bpasero commentedon Nov 23, 2021
As a workaround, passing
--user-data-dir <path>that is separate from the running instance should work.connor4312 commentedon Nov 23, 2021
I wonder if we should do this by default, set the user data and extension dirs to
${dir}-test. It would also prevent user settings or extensions from interfering with tests, which they can easily do.bpasero commentedon Nov 24, 2021
Yeah in fact our very own integration (API) tests always open VS Code on a random user data dir:
vscode/scripts/test-integration.sh
Line 14 in bef4dba
hsenag commentedon Nov 29, 2021
Thanks! Using this now and it's looking good.
connor4312 commentedon Jan 25, 2022
Verifier:
.vscode-testfolderreuseMachineInstall: truein the call torunTeststo use the old behavior (use the global user data dir)rchiodo commentedon Jan 26, 2022
/verified using jupyter extension tests after upgrading to newest test-electron.