forked from aliencube/ARM-Deployment-History-Cleaner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRun-Pester.ps1
22 lines (18 loc) · 944 Bytes
/
Run-Pester.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# This invokes pester test run.
#
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupName,
[string] [Parameter(Mandatory=$true)] $TestDirectory,
[string] [Parameter(Mandatory=$true)] $SrcDirectory,
[string] [Parameter(Mandatory=$true)] $OutputDirectory,
[string] [Parameter(Mandatory=$true)] $BuildNumber,
[string] [Parameter(Mandatory=$true)] $Username,
[string] [Parameter(Mandatory=$true)] $Password,
[string] [Parameter(Mandatory=$true)] $TenantId,
[bool] [Parameter(Mandatory=$false)] $IsLocal = $false
)
$parameters = @{ ResourceGroupName = $ResourceGroupName; SrcDirectory = $SrcDirectory; Username = $Username; Password = $Password; TenantId = $TenantId; IsLocal = $IsLocal }
$outputFile = "$OutputDirectory\TEST-$BuildNumber.xml"
$script = @{ Path = $TestDirectory; Parameters = $parameters }
Invoke-Pester -Script $script -OutputFile $outputFile -OutputFormat NUnitXml -EnableExit