-
Notifications
You must be signed in to change notification settings - Fork 132
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
testing for vs code extension #1428
Comments
Everything which can be tested with unit tests should be unit tests. E2E tests are expensive: more work to create, harder to maintain, take longer to execute, ... I would go for an incomplete set of E2E tests (smoke testing alike):
The rest I would do as unit tests (with quite some vscode mocking). If we find out, that some features we should have tested E2E, we can add it later on. What do you think @felixhaeberle ? |
@openscript You're right! Let's go for the minimal amount of e2e & test the rest with unit tests 👍 |
Worst case estimate is about 16.5 hours. |
@openscript Go for it 👍 |
ETA: 16th of October |
New ETA: 24th of October |
There is no public API to access/read decorations, hence it's difficult to test this in an e2e scenario: |
Without additional tools it's not possible to write proper E2E tests for Visual Studio Code. We need to access the UI renderer and internal API (like notifications). The guide from the VSCode project itself doesn't cover this: https://code.visualstudio.com/api/working-with-extensions/testing-extension I've found these tools to achieve this:
We need this, for the very basic tests like "E2E test: load an example project and verify loading status". The setup of this tools will take 2-3 hours. |
Interesting talk about this topic: |
Status update: The last two weeks I tried to get E2E testing up and running, but so far I didn't complete this part. Microsoft provides There are two projects that try to fill this gap:
I went with To proceed with
|
This week I've invested 15h into the E2E tests, but I couldn't produce resilient tests, which work with Github Actions. All my tinkering is here #1795. Along the way there were already several issues:
How should we proceed? I still think E2E tests are very valuable, as with unit testing we cannot catch things like #1803, but I'm not sure if it's worth to put somebodies main focus on this right now. |
we will introduce high(er) coverage of unit testing with #1876, so closing when merged. going forward, unit testing will be a continuous effort. |
closing as stale / likely has a duplicate in linear |
Problem
Currently, we lack a proper testing strategy for the vs code extension.
Context: We oftentimes get bugs or have misleading behavior because of changes we do which we can't properly test or it's simply too time-consuming to do so.
Expected behavior
We should implement a basic set of e2e tests that start the extension and test basic functionalities.
must-have tests for functionality:
project.inlang.json
nice-to-have tests for functionality:
"app.inlang.ideExtension"
)Tasks
Other information
cc @openscript What do you think? What is your estimate & how would you test the vs code extension?
The text was updated successfully, but these errors were encountered: