-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathRunTests.ps1
More file actions
33 lines (26 loc) · 1.14 KB
/
RunTests.ps1
File metadata and controls
33 lines (26 loc) · 1.14 KB
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
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Get current directory so we can reset back to it after running the tests
$currentDirectory = Get-Location
$config = Get-Content -Path .\config.json -Raw | ConvertFrom-Json
$tenantId = $config.tenantId
$environmentId = $config.environmentId
$user1Email = $config.user1Email
if ([string]::IsNullOrEmpty($environmentId)) {
Write-Error "Environment not configured. Please update config.json"
return
}
# Build the latest debug version of Test Engine from source
Set-Location ..\..\src
dotnet build
if ($config.installPlaywright) {
Start-Process -FilePath "pwsh" -ArgumentList "-Command `"..\bin\Debug\PowerAppsTestEngine\playwright.ps1 install`"" -Wait
} else {
Write-Host "Skipped playwright install"
}
Set-Location ..\bin\Debug\PowerAppsTestEngine
$env:user1Email = $user1Email
# Run the tests for each user in the configuration file.
dotnet PowerAppsTestEngine.dll -u "storagestate" -p "mda" -a "none" -i "$currentDirectory\mdagallerycontrols_testPlan.fx.yaml" -t $tenantId -e $environmentId
# Reset the location back to the original directory.
Set-Location $currentDirectory