npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vscode-test-explorer

v2.21.5

Published

Run your tests in the Sidebar of Visual Studio Code

Downloads

7

Readme

Test Explorer for Visual Studio Code

This extension provides an extensible user interface for running your tests in VS Code. It can be used with any testing framework if there is a corresponding Test Adapter extension.

Other extensions can get full access to the Test Adapters by acting as Test Controllers.

The Test Explorer can also be used in VS Live Share sessions by installing the Test Explorer Live Share extension.

This extension will be automatically installed when you install one of the Test Adapters, so there is usually no need to install this extension manually.

Migrating to native testing

In version 1.59, VS Code added an official API and UI for running tests, which provides all the functionality of this extension and more. Therefore this extension is now deprecated. I will keep maintaining it so it will remain usable but I don't plan to add any major new features to it.

Changes for users

You can keep using this extension as before, but you now also have the option to use VS Code's native testing UI instead by setting testExplorer.useNativeTesting to true in your VS Code settings.

Changes for extension authors

If you plan to write a new testing extension for VS Code, I recommend you use the native testing API as it's more flexible and has more features than this extension's Test Adapter API. Here's the official guide for the native testing API.

If you're maintaining an extension that uses the Test Adapter API, here is a short guide how to migrate your Test Adapter to the native API. The migration isn't strictly necessary because this extension will remain usable and your users can switch to the native testing UI using the testExplorer.useNativeTesting setting anyway, but you might find the additional flexibility of the native testing API useful in the future.

Test Adapters

Currently the following Test Adapters are available:

Javascript

ABAP

C

C++

Elixir

Elm

Go

Haxe

Java

Lua

Python

PHP

R

REST/GraphQL

Ruby

Rust

Swift

.NET Framework

Powershell

VHDL/SystemVerilog

Z80 Assembler

Live Share

  • The Test Explorer Live Share extension creates Test Adapters in Live Share guests that act as proxies for the Test Adapters in the Live Share host.

If there is no Test Adapter for your favorite testing framework yet, you can easily create your own.

Test Controllers

Currently the following Test Controllers are available:

  • The Test Explorer UI (which is the main part of this extension) is itself implemented as a Test Controller
  • The Test Explorer Diagnostics Controller adds test results to the Problems panel in VS Code.
  • The Test Explorer Status Bar extension provides information about the current test suite in the Status Bar.
  • The Test Explorer Live Share extension creates Test Controllers in the Live Share host that act as proxies for the Test Explorers in the Live Share guests.

Do you have a new idea for interacting with the Test Adapters? You can easily get full access to all Test Adapters in your own extension by implementing your own controller.

Configuration

The following configuration properties are available:

Property | Description --------------------------------------|--------------------------------------------------------------- testExplorer.onStart | Retire or reset all test states whenever a test run is started testExplorer.onReload | Retire or reset all test states whenever the test tree is reloaded testExplorer.codeLens | Show a CodeLens above each test or suite for running or debugging the tests testExplorer.gutterDecoration | Show the state of each test in the editor using Gutter Decorations testExplorer.errorDecoration | Show error messages from test failures as decorations in the editor testExplorer.errorDecorationHover | Provide hover messages for the error decorations in the editor testExplorer.sort | Sort the tests and suites by label or location. If this is not set (or set to null), they will be shown in the order that they were received from the adapter testExplorer.showCollapseButton | Show a button for collapsing the nodes of the test tree testExplorer.showExpandButton | Show a button for expanding the top nodes of the test tree, recursively for the given number of levels testExplorer.showOnRun | Switch to the Test Explorer view whenever a test run is started testExplorer.addToEditorContextMenu | Add menu items for running and debugging the tests in the current file to the editor context menu testExplorer.mergeSuites | Merge suites with the same label and parent testExplorer.hideEmptyLog | Hide the output channel used to show a test's log when the user clicks on a test whose log is empty testExplorer.hideWhen | Hide the Test Explorer when no test adapters have been registered or when no tests have been found by the registered adapters. The default is to never hide the Test Explorer (some test adapters only work with this default setting). testExplorer.useNativeTesting | Disable the Test Explorer UI and use VSCode's native Testing UI instead

Further configuration options are provided by the Test Adapters.

Commands

The following commands are available in VS Code's command palette, use the ID to add them to your keyboard shortcuts:

ID | Command -------------------------------------|-------------------------------------------- test-explorer.reload | Reload tests test-explorer.run-all | Run all tests test-explorer.run-file | Run tests in current file test-explorer.run-test-at-cursor | Run the test at the current cursor position test-explorer.rerun | Repeat the last test run test-explorer.debug-test-at-cursor | Debug the test at the current cursor position test-explorer.redebug | Repeat the last test run in the debugger test-explorer.cancel | Cancel running tests