This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RunPostmanTests.ps1
29 lines (25 loc) · 1.56 KB
/
RunPostmanTests.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
$StackName = $env:stackName
$url = "https://" + $StackName + "-staging.azurewebsites.net"
@{
values = @(
@{ key = "endpoint"; value = "$url"; },
@{ key = "resource_id"; value = "$env:Postman_resource_id"; },
@{ key = "tenant_id"; value = "$env:Postman_tenant_id"; },
@{ key = "isRemote"; value = "$env:Postman_isRemote"; },
@{ key = "tenant1Id"; value = "$env:Postman_tenant1Id"; },
@{ key = "tenant1user1"; value = "$env:Postman_tenant1user1"; },
@{ key = "tenant1user1password"; value = "$env:Postman_tenant1user1password"; },
@{ key = "resourceId"; value = "$env:Postman_resourceId"; },
@{ key = "clientId"; value = "$env:Postman_clientId"; },
@{ key = "clientSecret"; value = "$env:Postman_clientSecret"; },
@{ key = "adminUser1"; value = "$env:Postman_adminUser1"; },
@{ key = "adminUser1password"; value = "$env:Postman_adminUser1password"; },
@{ key = "adminResourceId"; value = "$env:Postman_adminResourceId"; },
@{ key = "adminId"; value = "$env:Postman_adminId"; },
@{ key = "adminClientId"; value = "$env:Postman_adminClientId"; },
@{ key = "adminClientSecret"; value = "$env:Postman_adminClientSecret"; }
)
} | ConvertTo-Json -depth 100 | Out-File -encoding ASCII postman_environment.json
npm install --save-dev newman
Write-Host "Running postman"
node_modules\.bin\newman run tests\Eklee.Exam.Api.postman_collection.json -e postman_environment.json --reporters 'cli,junit' --reporter-junit-export $env:Common_TestResultsDirectory\report.xml