Quickie: testing vscode extensions

art yerkes
1 min readNov 12, 2022

--

I made a vscode language server a while back but didn’t have a great way of doing CI tests on it (to prove the artifact itself works). I recently figured out one way to do this that’s pretty convenient. I used code-server with selenium webdriver.

Code-server is pretty amazing. It just works, and you can spin up the container easily. Once you’ve confirmed that the http port is responding, you can write selenium webdriver tests against it, rendered as a fairly empty canvas here:

https://gist.github.com/prozacchiwawa/a45fe32d29d6dd66ff40baf53c39547e

Since the system will start unconfigured each time, you’ll need to click the trust button to say that you trust the workspace, right click the extension (assuming it’s in the project directory) and then click install. This will do that part, leaving the system in the state where your extension is launching.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

art yerkes
art yerkes

Written by art yerkes

An old programmer learning new tricks.

No responses yet

Write a response