DevConf.cz 2021 has ended
Saturday, February 20 • 11:30am - 11:55am
Testing extensions for Visual Studio Code

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.

Visual Studio Code is an extremely popular editor and has a very rich ecosystem of extensions. However, testing these extensions is rather tricky in practice. Often extensions require external resources which have to be injected into the development environment. Unit tests are quite bad at testing the UI itself, as they require extensive setup code and a lot of mocking (= implementation of the production API in the testing environment that exposes the same interface). Checking the results of them still requires one to manually verify that the UI looks correct. All this combined can easily lead to false-positives and false-negatives. Integration tests on the other hand are not a silver bullet either as they can be rather brittle, slow, lengthy to write, hard to set up while also not being able to cover edge-cases very efficiently.
This talk will focus on what we learned while developing the Open Build Service Connector: which testing strategies work, which don't and what tools to use. We will cover some viable approaches to unit testing and the vscode-extension-tester module that we used for integration tests.

avatar for Dan Čermák

Dan Čermák

Software Engineer Development Tools, SUSE
Dan joined SUSE to work on development tools as part of the developer engagement program, after working on embedded devices. Currently he is maintaining the openSUSE vagrant boxes, vagrant and creates the Open Build Service Connector, an extension for Visual Studio Code that integrates... Read More →

Saturday February 20, 2021 11:30am - 11:55am CET
Session Room 1