Files
runner-images-sangeeth/images/macos/tests/Run-Tests.ps1
2020-09-10 14:34:08 +03:00

25 lines
636 B
PowerShell

param (
[Parameter(Mandatory=$true)]
$WorkingDirectory,
[Parameter(Mandatory=$true)]
$OutputFile
)
$ErrorActionPreference = "Stop"
Import-Module Pester
Set-Location -Path $WorkingDirectory
$parentDirectory = Split-Path $OutputFile -Parent
if (-not (Test-Path $parentDirectory)) { New-Item -Path $parentDirectory -ItemType Directory | Out-Null }
$configuration = [PesterConfiguration] @{
Output = @{ Verbosity = "Detailed" }
TestResult = @{
Enabled = $true
OutputPath = $OutputFile;
OutputFormat = "NUnitXML"
}
}
Invoke-Pester -Configuration $configuration