Pester Task YAML - rfennell/AzurePipelines GitHub Wiki
Pester
The Pester package contains the following tasks. The table show the possible variables that can be used in YAML Azure DevOps Pipeline configurations
Pester
Run Pester tests by either installing the latest version of Pester at run time (if possible) or using the version shipped with the task (4.3.1)
YAML snippet
# Pester Test Runner from Black Marble
# Description - Run Pester tests by either installing the latest version of Pester at run time (if possible) or using the version shipped with the task (4.3.1)
- task: richardfennellBM.BM-VSTS-PesterRunner-Task.Pester-Task.Pester@8
inputs:
# Required arguments
scriptFolder: $(System.DefaultWorkingDirectory)\*
resultsFile: $(System.DefaultWorkingDirectory)\Test-Pester.XML
run32Bit: False
Arguments
- Argument: scriptFolder
- Description: Folder to run scripts from e.g $(System.DefaultWorkingDirectory)* or a script hashtable @{Path='$(System.DefaultWorkingDirectory)'; Parameters=@{param1='111'; param2='222'}}
- Type: string
- Required: True
- Default (if defined): $(System.DefaultWorkingDirectory)*
- Argument: resultsFile
- Description: Results File (nUnit format)
- Type: string
- Required: True
- Default (if defined): $(System.DefaultWorkingDirectory)\Test-Pester.XML
- Argument: CodeCoverageOutputFile
- Description: Code coverage output file (JaCoCo format) - Requires Pester version 4.0.4+
- Type: string
- Required: False
- Default (if defined):
Tags
- Argument: tag
- Description: Tags used to filter which tests to run.
- Type: string
- Required: False
- Default (if defined):
- Argument: excludeTag
- Description: Tags to exclude when running tests.
- Type: string
- Required: False
- Default (if defined):
Advanced
- Argument: additionalModulePath
- Description: Adds a path to PSModulePath before running the tests, for dependencies or generated modules
- Type: string
- Required: False
- Default (if defined):
- Argument: CodeCoverageFolder
- Description: Path to the folder or file to run coverage against. Requires CodeCoverageOutputFile.
- Type: string
- Required: False
- Default (if defined):
- Argument: run32Bit
- Description: Run in 32bit
- Type: boolean
- Required: True
- Default (if defined): False
- Argument: ScriptBlock
- Description: A scriptblock to run before tests are executed. This will be run in the scope of the task where Invoke-Pester is run.
- Type: string
- Required: False
- Default (if defined):