Write your first test in seconds
Save a *.Tests.ps1 file, describe what your code should do, and run it. Pester handles discovery, execution and reporting.
BeforeAll {
. $PSScriptRoot/Get-Planet.ps1
}
Describe 'Get-Planet' {
It 'lists all 8 planets' {
$planets = Get-Planet
$planets.Count | Should-Be 8
}
}

Green when it passes — and a precise, readable diff the moment it doesn't.
Everything you need to test PowerShell
From a one-line assertion to validating entire environments — Pester scales with you.
Readable, expressive syntax
Describe, Context, It and Should read like plain English. Tests document intent instead of hiding it in boilerplate.
Powerful mocking
Replace any command with a mock, control what it returns, and assert exactly how it was called — no dependency injection required.
Built-in code coverage
See which lines your tests exercise and export JaCoCo or Cobertura reports your pipeline already understands.
Runs everywhere
PowerShell 7.4+ on Windows, Linux and macOS — test the same code everywhere it runs.
First-class VS Code
Run and debug tests straight from the Test Explorer, jump to failures, and scaffold tests with snippets.
CI/CD ready
Emit NUnit or JUnit results for GitHub Actions, Azure Pipelines, Jenkins and more. Fail the build when a test fails.
Pester is the standard test framework for PowerShell — trusted by the PowerShell project itself and teams across the ecosystem, including Microsoft and Azure.

Logos are trademarks of their respective owners.
Ready to write your first test?
Install Pester and go from zero to a green test in minutes.



