Tom Smykowski beta

Blog

How to test Visual Studio Code extension — part 1

How to test Visual Studio Code extension — part 1

Hi, my name is Tom Smykowski, I'm a staff full-stack engineer. I build and scale SaaS platforms to millions of users, working end-to-end from system architecture to frontend to mobile. On this blog I share what I learn about software engineering, career growth, and navigating the AI revolution.

What This Article Covers

In this first part of a series on testing Visual Studio Code extensions, we dive into the essential methods and tools for writing comprehensive tests. You'll discover how to set up test environments, manipulate extension preferences, and utilize Visual Studio Code's API to ensure your extension functions flawlessly. This article is packed with practical insights and code examples to guide you through the testing process.

Questions This Article Answers

  • What are the initial steps to set up a test environment for a Visual Studio Code extension?
  • How can I change extension preferences programmatically for each test case?
  • What strategies can be used to create and manipulate files within a test scenario?
  • How do I effectively handle Thenable errors during testing?
  • What are the best practices for verifying the visibility of rich features like CodeLens in a test?

Length and Time

A detailed guide with practical examples and step-by-step instructions. Approximately 7 minutes to read.

Want to unlock the full story? Log in

← All posts