microsoft / microsoft/vscode-test

Feature Request: Integration testing using packed extensions

Open
#289 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
316
Forks
73
Avg merge
1d 6h
Merged PRs (30d)
3

Description

Background
I ran now multiple times into the problem that my tests couldn't catch problems which occurred only on the published version. The reason in most cases was that things are working fine when the extension is launched from the "development working directory" while failing when cleanly installed and installed to the "vscode extension directory" due to file system differences.

Especially when bundling dependencies and excluding files from the packed dependency things can easily go wrong and the test executed will not catch such errors.

Requested solution
For those scenarios it would be awesome if the vscode extension test framework and runners would support a mechanism, where the extension is automatically packed into a vsix (like in npx @vscode/vsce package), installed into a clean vscode instance (--install-extension + --extensions-dir), and then tests are executed using against this instance.

I think I'll be able to stitch something together myself in my CI/CD pipeline but ultimately I'd hope to have something as simple as setting an option in the defineConfig() options.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the defineConfig() options and the existing test runner flow. Compare the requested @vscode/vsce package step with VS Code's --install-extension and --extensions-dir options; done means tests can run against the packed extension in a clean instance through configuration rather than custom CI/CD glue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.