jimmymcp / al-test-runner

VS Code Extension to help run AL tests against Business Central container
https://jpearson.blog/al-test-runner-for-visual-studio-code/
MIT License
12 stars 16 forks source link

Invoke-ALTestRunner: command not found #138

Closed tscottjendev closed 8 months ago

tscottjendev commented 8 months ago

I have to be missing something obvious but when I run at test (from CodeLens option or anywhere), the terminal that opens is running bash. What am I doing wrong? Shouldn't it be running in a straight PS terminal?

dev_tscott@vR2-DHost1 MINGW64 /z/Shared/Todd/Repos/Github/tscottjendev/Katas/RomanNumeral-Test $ if ($null -eq (Get-Module ALTestRunner)) {Import-Module "c:\Users\Dev_TSCOTT.vscode\extensions\jamespearson.al-test-runner-10.10.12\PowerShell\ALTestRunner.psm1" -DisableNameChecking} bash: syntax error near unexpected token `('

dev_tscott@vR2-DHost1 MINGW64 /z/Shared/Todd/Repos/Github/tscottjendev/Katas/RomanNumeral-Test $

dev_tscott@vR2-DHost1 MINGW64 /z/Shared/Todd/Repos/Github/tscottjendev/Katas/RomanNumeral-Test $ cd "z:\Shared\Todd\Repos\Github\tscottjendev\Katas\RomanNumeral-Test"

dev_tscott@vR2-DHost1 MINGW64 /z/Shared/Todd/Repos/Github/tscottjendev/Katas/RomanNumeral-Test $ Invoke-ALTestRunner -Tests Test -ExtensionId "eb641615-e41e-49ec-b474-be983946a7fd" -ExtensionName "RomanNumeral-Test" -FileName "z:\Shared\Todd\Repos\Github\tscottjendev\Katas\RomanNumeral-Test\src\ArabicRomanNumeralTest.Codeunit.al" -SelectionStart 10 -LaunchConfig '{"name":"Your own server","request":"launch","type":"al","environmentType":"OnPrem","server":"https://bc23ts","serverInstance":"BC","authentication":"AAD","breakOnError":"All","launchBrowser":true,"enableLongRunningSqlStatements":true,"enableSqlInformationDebugger":true,"tenant":"default","usePublicURLFromServer":true}' -GetPerformanceProfile bash: Invoke-ALTestRunner: command not found

dev_tscott@vR2-DHost1 MINGW64 /z/Shared/Todd/Repos/Github/tscottjendev/Katas/RomanNumeral-Test $

tscottjendev commented 8 months ago

What I see in the terminal

image

jimmymcp commented 8 months ago

The extension only asks for a terminal to be opened, VS Code settings handle which terminal it is and how it runs. See here: https://code.visualstudio.com/docs/terminal/profiles

The default terminal needs to be PowerShell (or Pwsh - for PowerShell 7).

tscottjendev commented 8 months ago

PowerShell is set as the default image

I had to kill the terminal session then it finally started without bash running.