-
Notifications
You must be signed in to change notification settings - Fork 178
/
run-e2e-tests.ps1
34 lines (25 loc) · 1.02 KB
/
run-e2e-tests.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function RunTest([string] $project, [string] $description,[bool] $skipBuild = $false, $filter = $null) {
Write-Host "Running test: $description" -ForegroundColor DarkCyan
Write-Host "-----------------------------------------------------------------------------" -ForegroundColor DarkCyan
Write-Host
$cmdargs = "test", "$project", "-v", "q", "-l", "trx", "-r",".\testResults"
if ($filter) {
$cmdargs += "--filter", "$filter"
}
& dotnet $cmdargs | Out-Host
$r = $?
Write-Host
Write-Host "-----------------------------------------------------------------------------" -ForegroundColor DarkCyan
Write-Host
return $r
}
$tests = @(
@{project ="$PSScriptRoot/test/E2ETests/E2ETests/E2ETests.csproj"; description="E2E integration tests"}
)
$success = $true
$testRunSucceeded = $true
foreach ($test in $tests){
$testRunSucceeded = RunTest $test.project $test.description $testRunSucceeded $test.filter
$success = $testRunSucceeded -and $success
}
if (-not $success) { exit 1 }