Issue
There needs to be a small change to the RunTest.ps1 to be able to run the test file in one of the sample directories. Without this change, I just got this lovely error:
[Critical Error]: Please ensure 'outputDirectory' is set to a value resolving to a location inside the permitted output location.
To Reproduce
-
Clone repo: # Clone GitHub repo
git clone https://github.com/microsoft/PowerApps-TestEngine.git
-
CD PowerApps-TestEngine\src
-
dotnet build
-
Install browsers required by Playwright
.\bin\Debug\PowerAppsTestEngine\playwright.ps1 install
-
Navigate to desired sample folder eg. /samples/buttonclicker
-
Import desired solution to environment e.g. ButtonClicker_1_0_0_4.zip
-
Create config.dev.json in the /buttonclicker folder
{
"environmentId": "<environmentId>",
"tenantId": "<tenantId>",
"testPlanFile": "./testPlan.fx.yaml",
"outputDirectory": "",
"runInstall": false,
"installPlaywright": false,
"user1Email": "my@email.com",
"logLevel": "1",
"domain": "",
"queryParams": ""
}
- Make some changes to RunTest.ps1 in the same folder
Essentially change the dame of the config.json file we're reading and also add an additional parameter outputDirectory
$config = Get-Content -Path .\config.dev.json -Raw | ConvertFrom-Json
$tenantId = $config.tenantId
$environmentId = $config.environmentId
$user1Email = $config.user1Email
$outputDirectory = $config.outputDirectory
Ensure we reference the name of the output directory with an additional parameter below, even though this is empty in the config file
dotnet PowerAppsTestEngine.dll -u "storagestate" --provider "canvas" -a "none" -i "$currentDirectory\testPlan.fx.yaml" -t $tenantId -e $environmentId --outputDirectory "$outputDirectory" --logLevel $config.logLevel
If you comment out --outputDirectory "$outputDirectory" , you can reproduce the error.
Now the tests will run.
Setting installPlaywright=true in the config file, just briefly oppended command window with a few errors but this didn't seem stop me running the tests.
Issue
There needs to be a small change to the RunTest.ps1 to be able to run the test file in one of the sample directories. Without this change, I just got this lovely error:
[Critical Error]: Please ensure 'outputDirectory' is set to a value resolving to a location inside the permitted output location.To Reproduce
Clone repo: # Clone GitHub repo
git clone https://github.com/microsoft/PowerApps-TestEngine.git
CD PowerApps-TestEngine\src
dotnet build
Install browsers required by Playwright
.\bin\Debug\PowerAppsTestEngine\playwright.ps1 install
Navigate to desired sample folder eg. /samples/buttonclicker
Import desired solution to environment e.g. ButtonClicker_1_0_0_4.zip
Create config.dev.json in the /buttonclicker folder
Essentially change the dame of the config.json file we're reading and also add an additional parameter outputDirectory
Ensure we reference the name of the output directory with an additional parameter below, even though this is empty in the config file
dotnet PowerAppsTestEngine.dll -u "storagestate" --provider "canvas" -a "none" -i "$currentDirectory\testPlan.fx.yaml" -t $tenantId -e $environmentId --outputDirectory "$outputDirectory" --logLevel $config.logLevelIf you comment out
--outputDirectory "$outputDirectory", you can reproduce the error.Now the tests will run.
Setting installPlaywright=true in the config file, just briefly oppended command window with a few errors but this didn't seem stop me running the tests.