🚧 THIS EXTENSION IS IN PREVIEW STATE, THERE ARE GOING TO BE BUGS 🚧
This extension provides the ability to run Pester tests utilizing the native Testing functionality first introduced in Visual Studio Code 1.59
🔍 Pester Test Browser 🐞 Debugging Support 👩💻 Native PowerShell Extension Integration 👨👧👦 Expands Test Cases
- Pester 5.2.0 or later (sorry, no Pester 4 support)
- PowerShell 7+ or Windows PowerShell 5.1
The extension will automatically discover all .Tests.ps1
Pester files in your workspace, you can then run tests either
from the Tests pane or from the green arrows that will appear adjacent to your tests.
Preview VSIX extension packages are generated upon every commit to main and every pull request update. To install a beta build:
- Click the green checkmark next to the latest commit
- Click
Details
next to the👷♂️ Build Visual Studio Code Extension
task - Click
Artifacts
in the upper right of the window - Download the latest artifact zip and unzip it, it should be named
vsix-{version}
- Open the resulting folder in vscode, right click the
.vsix
file, and chooseInstall Extension VSIX
near the bottom. - Alternatively in vscode you can hit F1 and choose
Extensions: Install from VSIX
and browse for the vsix file.
This extension will use the PowerShell Extension Pester verbosity settings for the output.
The Pester Output
pane maintains a log of the activities that occur with the Pester extension. You can use Set Log Level
in the command palette to increase the log level to debug or trace to get more information about what is going on. Include this information when submitting an issue along with reproduction steps.
- For test history purposes, a test is uniquely identified by its full path, e.g. Describe/Context/It. If you rename a test or move a test to another context/describe, it will be treated as a new test and test history will be reset
- If you do not have any .tests.ps1 files in your directory upon startup, you will currently need to reload vscode for the extension to activate after you create the .tests.ps1 file. This is is a known issue that is being tracked