Boilerplate to do e2e testing of vscode extension using Cypress and code-server
Read a detail guide on how this was setup in my article Testing VSCode Extensions with Cypress and code-server
Vs code provides a way to test extension by running another vscode instance locally. While it is a great way of writing unit tests I did not find a proper way of doing E2E scenarios.
I have been also researching Cypress so I decided to combine both!
The way the e2e setup works is the following:
- extension is packaged into vsix (vscode package extension)
- vscode server running on chrome is started (using code-server)
- Cypress connects to that vscode server and runs the test cases on it.
- After the tests are finished, the server is shutdown.
Docker and docker-compose are required to run code-server.