[Critical Error]: Please ensure 'outputDirectory' is is set to a value - need to update RunTest.PS1
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 50/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- powershell
- Domain
- testing-qa
Research direction
Start with RunTest.ps1 and compare its config.dev.json fields with the PowerAppsTestEngine.dll command shown in the issue. Run the buttonclicker sample using the provided reproduction steps and confirm the critical outputDirectory error no longer occurs.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C#
- Stars
- 150
- Forks
- 55
- Avg merge
- 5d 23h
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/PowerApps-TestEngine
-
new
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
new
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
new
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
question
Difficulty 5/5 Over a week Newbie friendliness 20/100
All issues in microsoft/PowerApps-TestEngine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nightscout/nocturne#1379 ·
-
priority-0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
StackExchange/StackExchange.Redis#3249 ·
-
[Feat] 조합 영역 구분선 개선 Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100