News

VS Code Dev Team Eyes Long-Requested Testing Support

The latest update to Visual Studio Code marks the early stages of an investigation by the dev team into improving testing support for Microsoft's popular, cross-platform, open source code editor.

Of course, testing is possible in VS Code via numerous extensions, but Microsoft is seeking to spearhead a more structured, comprehensive approach.

The 2020 Roadmap for VS Code, last updated 23 days ago, shows testing is an item:

Investigate how VS Code can improve the testing support. Several extensions are already providing testing support, explore what APIs/UIs could be added to improve these testing extensions and the test running experience.

In announcing the latest update to VS Code (v1.53, January 2021), the dev team this week said, "We are investigating testing in VS Code, and the first version of the API is now present in vscode.proposed.d.ts," referring to the team's set of unstable API that are implemented in VS Code but not exposed to the public as stable API does.

"This iteration focused building out the Selfhost Test Provider for VS Code and foundational UI, primarily the test explorer, gutter decorations, and peek views for results."

Testing approaches being considered by Microsoft are outlined in GitHub issue #107467, appropriately titled "Testing in VS Code."

Pointing out that testing has been a longstanding request dating back at least four years or so, the issue notes "excellent extensions" provided by the community, but noted some concerns with that approach.

"Each implementation of testing presents a different set of features, UI, and idiomaticity. Because there is no sanctioned approach to tests in VS Code, extension developers tend to make bespoke implementations, as we've seen in the Python and Java language extensions. Ideally, like in debugging, a VS Code user would have just about the same experience as they work between projects and languages.

"The Test Explorer UI presents the best point of inspiration for us, as there are many existing extensions built on its API: it's capable and proven. Regardless of the direction we take in VS Code, we should have a way for its Test Adapters to be upgraded to the new world."

A Failed Test Showing the Difference Between Actual and Expected Values in a Diff Peek View
[Click on image for larger view.] A Failed Test Showing the Difference Between Actual and Expected Values in a Diff Peek View (source: Microsoft).

The GitHub issue goes on to discuss different approaches that could be taken to prototype an API in the extension host, along with many other details all being fleshed out among many developers, including testing tool maintainers. That conversation, again, is right here.

Wrapping Tabs in Animated Action
[Click on image for larger, animated GIF view.] Wrapping Tabs in Animated Action (source: Microsoft).

Another highlight of the January 2021 update introduces the ability to wrap tabs across the top when there are too many to be shown onscreen, instead of having to use a scrollbar to see them all. Wrapping tabs is enabled by the workbench.editor.wrapTabs setting. Coincidentally, this feature was one of the favorite tips and tricks shared by Sana Ajani, a program manager on Microsoft's Visual Studio code team, in a presentation at the recent VS Code Day online event. She called it a "highly, highly requested" feature.

Other updates in VS Code v1.53 as highlighted by the team include:

All of the above and much more is presented in much greater detail in the automatic "Release Notes: 1.53.0" file that pops up when you load VS Code, of course, and in the announcement post.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events