Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Critical Error]: Please ensure 'outputDirectory' is is set to a value - need to update RunTest.PS1

Aperta
#670 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
50/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
powershell
Ambito
testing-qa

Direzione di ricerca

Inizia con RunTest.ps1 e confronta i relativi campi config.dev.json con il comando PowerAppsTestEngine.dll mostrato nell’issue. Esegui l’esempio buttonclicker seguendo i passaggi di riproduzione forniti e conferma che l’errore critico di outputDirectory non si verifica più.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

new

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

  1. Clone repo: # Clone GitHub repo
    git clone https://github.com/microsoft/PowerApps-TestEngine.git

  2. CD PowerApps-TestEngine\src

  3. dotnet build

  4. Install browsers required by Playwright
    .\bin\Debug\PowerAppsTestEngine\playwright.ps1 install

  5. Navigate to desired sample folder eg. /samples/buttonclicker

  6. Import desired solution to environment e.g. ButtonClicker_1_0_0_4.zip

  7. Create config.dev.json in the /buttonclicker folder

{
  "environmentId": "<environmentId>",
  "tenantId": "<tenantId>",
  "testPlanFile": "./testPlan.fx.yaml",
  "outputDirectory": "",
  "runInstall": false,
  "installPlaywright": false,
  "user1Email": "[email protected]",
  "logLevel": "1",
  "domain": "",
  "queryParams": ""
}

  1. 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.

Image

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.

Lingua principale
C#
Stelle
150
Fork
55
Merge medio
1h 18m
PR unite (30g)
1

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/PowerApps-TestEngine

Tutte le issue di microsoft/PowerApps-TestEngine

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.