pester-exec

Execute Pester tests across PowerShell 5.1 and 7.x versions and scopes.

1|3|Updated Sep 23, 2022
One-click install
npx skills add https://github.com/xxthunder/shortcuts --skill pester-exec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pester-exec
Source: https://github.com/xxthunder/shortcuts/tree/main/.claude/skills/pester-exec
Command: npx skills add https://github.com/xxthunder/shortcuts --skill pester-exec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PowerShell projects often struggle with executing Pester tests consistently across different versions and test scopes, leading to slow feedback and flaky results.

Core Features & Use Cases

  • Cross-version testing: Run unit, integration, and coverage scenarios across PowerShell 5.1 and 7.x.
  • Targeted testing: Execute tests on specific files or paths and support pre-commit verification.
  • Test orchestration: Centralized commands to run unit tests, integration tests, or full test suites with optional code coverage.

Quick Start

Run pwsh -File ".\test\bin\testrunner.ps1" to execute all Pester tests across formats and versions.

Frequently Asked Questions about pester-exec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Pester tests across multiple PowerShell versions?

To run Pester tests across multiple PowerShell versions, execute the included testrunner script, which orchestrates unit, integration, and coverage tests across Windows PowerShell 5.1 and PowerShell 7.x. It provides standardized commands for consistent cross-version execution.

Can I execute targeted Pester tests on specific files for pre-commit verification?

Yes, you can execute targeted Pester tests on specific files or paths for pre-commit verification. The testrunner script supports running specific test scopes, allowing you to validate individual files before committing changes to your PowerShell project.

How do I generate code coverage reports for PowerShell unit tests?

To generate code coverage reports for PowerShell unit tests, use the centralized testrunner script to run a coverage scenario. It orchestrates Pester test execution across Windows PowerShell 5.1 and 7.x while collecting code coverage data for your project.

Does this testrunner support both unit and integration test scopes?

Yes, the testrunner supports both unit and integration test scopes. It provides standardized commands to execute full test suites or individual scopes across Windows PowerShell 5.1 and PowerShell 7.x, ensuring consistent orchestration and reliable feedback for your PowerShell project.

Why are my Pester tests giving flaky results across different PowerShell environments?

Pester tests often give flaky results due to inconsistent execution across different PowerShell versions and test scopes. This testrunner script solves the problem by providing standardized commands and centralized orchestration across Windows PowerShell 5.1 and PowerShell 7.x.