Giter Site home page Giter Site logo

jimmymcp / al-test-runner Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 16.0 521 KB

VS Code Extension to help run AL tests against Business Central container

Home Page: https://jpearson.blog/al-test-runner-for-visual-studio-code/

License: MIT License

PowerShell 34.38% TypeScript 65.62%
msdyn365bc testing

al-test-runner's People

Contributors

bjarkihall avatar christiansell avatar cpstos avatar criticalmax avatar dependabot[bot] avatar ichladil avatar jimmymcp avatar jwikman avatar lgtm-migrator avatar lksg avatar martonsagi avatar maz3l avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

al-test-runner's Issues

'altestrunner.installTestRunnerService' not found

Hey James,

Finally I wanted to get going with the code coverage part of your tool as I wanted to mention, and add a short demo, to the 2nd edition of my book.
Your blog post https://jpearson.blog/2021/02/07/measuring-code-coverage-in-business-central-with-al-test-runner/ looked very comprehensive, but apparently some things are missing here (and nothing mentioned about this in the documentation in the VS Code extension).

As per step 1 one of the Setup described in the blog post I wanted to install the Test Runner Service app with the command in Visual Studio Code. First time I did this I got an error that resembles the error reported here #36. Unfortunately I could not reproduce as I did restart VS Code - hoping this might solve it. When restarted and triggering the same command I did get another error:

Command 'AL Test Runner: Install Test Runner Service' resulted in an error (command 'altestrunner.installTestRunnerService' not found)

The step also mentions If it is already installed you will need to uninstall and unpublish the existing version first. How do you do that?

So, at this point I am stuck, which is somewhat unfortunate as I had hoped to finish this part of my book today. Nevertheless, would be very pleased if you can help me out asap. Maybe get online together to solve this.

Test Result Highlighting Wrong Test Method

Two tests, the name of one of the tests is also the start of another test e.g.

RegisterWhseJnlLineWithoutContainerNo
ReigsterWhseJnlLine

The highlighting for both tests is being applied to the declaration of the first test.

Tests do not start

Hello,
I have a new repo with test codeunits, If I starte one or some tests, only the icon for Running tests.. in the task bar is running.
image
The terminal shows no statements to start like Import-Module or Invoke-ALTestRunner.
If I starte tests manually with the commands, the Testing explorer shows nothing
image
image

Add support for BCContainerHelper

Since NavContainerHelper will not be continued and it is now BCContainerHelper, can you please add support for BCContainerHelper? I would assume that the best way would be to determine, if BCContainerHelper or NAVContainerHelper are installed and then import the proper one.

Error: Cod75650.UnblockDeletionEnabledFLX.al is not an AL test codeunit

Wanting demo the AL Test Runner tried to run the first test in the testcodeunt Cod75650.UnblockDeletionEnabledFLX.al and got the error:

Cod75650.UnblockDeletionEnabledFLX.al is not an AL test codeunit

Find attached the test codeunit itself, that was created using our ATDD.TestScriptor.

Cod75650.UnblockDeletionEnabledFLX.al.txt

What kind of assumption is AL Test Runner making about a test codeunit, apart from the Subtype property set to Test?

Unexpected token } in JSON at position

Hi :)

I've get the error "Unexpected token } in JSON at position" everytime I want to start the tests:
image

After some hours I had found the error. In the launch.json was a comma at the end. Sure an error but I've searched the wrong places.
image

Is that an error of AL Test Runner?

Specifying testRunnerCodeunitId is not supported when using the C/AL test runner (BC14)

Version: 0.7.7

When executing a test for BC14 with the newest version of al-test-runner it throws the following error:
Specifying testRunnerCodeunitId is not supported when using the C/AL test runner

It has been working great so far with previous versions, and after rolling back to 0.6.3 I am able to execute the test(s) again.

I looked at the recent changes and guess it could have something to do with the new default value of the TestRunnerCodeunitId in Invoke-RunTests.ps1 in combination with the fact that the paramater is only added if it is greater 0 in the config at Invoke-ALTestRunner.ps1:

    if ((Get-ValueFromALTestRunnerConfig -KeyName 'testRunnerCodeunitId') -gt 0) {
        $Params.Add('TestRunnerCodeunitId', (Get-ValueFromALTestRunnerConfig -KeyName 'testRunnerCodeunitId'))
    }

No tests results stored

After a long time of AL Test Runner abstinence, I've tried using the extension again, this time for a local, BC 16 targeting workspace consisting of the main app and a test app.

My issue is that "Run test" does not store any results, the folder stays empty:
image
Hovering the test functions returns

There are no results for this test ๐Ÿคทโ€โ™€๏ธ

The VS Code Terminal has logged that it actually tried to do the right thing:

PS MyRepoPath\test> cd "MyRepoPath\test"
PS MyRepoPath\test> Invoke-ALTestRunner -Tests Test -ExtensionId 3c2f6d94-3d73-4f42-8756-ac3c8af4846c -ExtensionName "MyTestAppName" -FileName "MyRepoPath\test\src\Tests\TestAttributes.Codeunit.al" -SelectionStart 12
Running tests on BC-Last-Rel-DE, company CRONUS DE, codeunit 5559711, function NoUDIItemCategoryShownOnItemCategoriesPage, suite MyTestSuiteName
WARNING: TaskScheduler is running in the container. Please specify -EnableTaskScheduler:$false when creating container.
Copy from container BC-Last-Rel-DE (C:\ProgramData\NavContainerHelper\Extensions\BC-Last-Rel-DE\my\8bf264f6-d12f-46b8-a734-5483abbf5b40.xml) to MyRepoPath\test\.altestrunner\8bf264f6-d12f-46b8-a734-5483abbf5b40.xml

After that, no error.
However, I've observed the docker container folder during the test run, and an XML file is created there, and then immediately removed. It has not been copied to MyRepoPath\test\.altestrunner\ as specified by the terminal log.

Any ideas?

Cannot open page 130455. You might need to import the test toolkit to the container

Hello James,

I really love the altestrunner but for some reason I run into this error for a while and could not figure out what's wrong.

PS C:\DevOps\MyApp\test> cd "c:\DevOps\MyApp\test"
PS C:\DevOps\MyApp\test> Invoke-ALTestRunner -Tests All -ExtensionId 79081a2a-d3db-4c71-b144-af22b403e2e4 -ExtensionName "My App.Test"
Please select a company to run tests in:
[0]: Cancel
[1]: CRONUS DE
[2]: My Company
1
Running tests on bc, company CRONUS DE, extension My App.Test
Cannot open page 130455. You might need to import the test toolkit to the
container and/or remove the folder
C:\ProgramData\NavContainerHelper\Extensions\bc\PsTestTool-4 and retry. You
might also have URL or Company name wrong.
At C:\ProgramData\NavContainerHelper\Extensions\bc\PsTestTool-4\PsTestFunctions
.ps1:264 char:9
+         throw "Cannot open page $testPage. You might need to import t ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Cannot open pag...any name wr
   ong.:String) [], RuntimeException
    + FullyQualifiedErrorId : Cannot open page 130455. You might need to impor
   t the test toolkit to the container and/or remove the folder C:\ProgramDat
  a\NavContainerHelper\Extensions\bc\PsTestTool-4 and retry. You might also
 have URL or Company name wrong.

Error occurred, retrying...

I tried everything to get it to work back again.

  • Recreated container (BC15 + BC16)
  • Reset Docker to factory defaults
  • Imported Test Toolkit again
  • Uninstalled NavContainerHelper, Reinstalled newest version

Do you've any advice what I should look for?

Thank you very much
Chris

testRunnerServiceURL tooltip

Reading your blog, it seems like the testRunnerServiceURL needs to target the ODATAv4 TestRunner_RunTest endpoint. Which is the valid endpoint I suppose.

The tooltip of testRunnerServiceURL suggest (an old value?) ODatav4 TestRunner endpoint instead. Maybe update to reflect the new endpoint?

image

Error when using 'Debug Test' Cannot bind argument to parameter 'InputObject' because it is null.

Probably I have wrong setting, but which one. I get the error "Cannot bind argument to parameter 'InputObject' because it is null." in the terminal of VS Code when using 'Debug Test'.
I have added this setting to the config.json:
"testRunnerServiceUrl": "http://latest17-base-t-1022:7047/BC/WS/CRONUS%20International%20Ltd./Codeunit/TestRunner_RunTest?tenant=default",
And this is my launch.json

{
"version": "0.2.0",
"configurations": [
{
"name": "Attach: Your own server",
"type": "al",
"request": "attach",
"server": "http://latest17-base-t-1022",
"serverInstance": "BC",
"tenant": "default",
"authentication": "UserPassword",
"breakOnError": true,
"breakOnRecordWrite": false,
"enableSqlInformationDebugger": true,
"enableLongRunningSqlStatements": true,
"longRunningSqlStatementsThreshold": 500,
"numberOfSqlStatements": 10,
"breakOnNext": "WebServiceClient"
}
]
}

BTW. Codeunit 79150 does not get a OData URL in the Web Services, only a SOAP URL.

Running API tests is not possible

When running API tests (like standard tests for the Exclude_APIV1 and Exclude_APIV2 extensions) the environment needs to be accessed using Windows authentication and should not have any user related data in the database. See also this discussion
https://www.yammer.com/dynamicsnavdev/threads/1383604008484864.

Now, AL Test Runner forces the creation of a user in the database in the docker container. Thus, I cannot run my API tests using AL Test Runner. Could this be fixed?

Running First Show Table Data Command from File in Production Code Fails

Show Table Data command opens al-test-runner-2 terminal if it doesn't already exist. The terminal is opened at the parent folder of the file it was opened from. In a multi-root workspace with separate apps for tests and prod code this could open the terminal to the path of the prod folder instead of the test folder.

In this case the Show Table Data command fails.

Unable to debug test procedures "Resource not found..."

I can run tests just fine, but when I try to debug one, I always get the following error code in the terminal:

Resource not found for the segment 'TestRunner_RunTest'. CorrelationId: 0f8e08b4-b769-4314-a577-ecda5ab1bd3a.

Note that the CorrelationId will be different every time. Additionally, an error notification from VS Code appears, which just says:

Running the contributed command: 'altestrunner.debugTest' failed.

Here is my config.json file:

{
    "containerResultPath":  "C:\\ProgramData\\BcContainerHelper",
    "launchConfigName":  "Debug Test",
    "securePassword":  "XXXXXX",
    "userName":  "XXXXX",
    "companyName":  "CRONUS AG",
    "testSuiteName":  "",
    "vmUserName":  "",
    "vmSecurePassword":  "",
    "remoteContainerName":  "",
    "dockerHost":  "",
    "newPSSessionOptions":  "",
    "testRunnerServiceUrl":  "http://ll-bc-at:7048/BC/ODataV4/TestRunner?company=CRONUS%20AG",
    "codeCoveragePath":  ".//.altestrunner//codecoverage.json"
}

And my launch.json file:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Test App",
            "request": "launch",
            "type": "al",
            "environmentType": "OnPrem",
            "server": "http://ll-bc-at",
            "serverInstance": "BC",
            "authentication": "Windows",
            "startupObjectId": 130401,
            "startupObjectType": "Page",
            "breakOnError": true,
            "launchBrowser": true,
            "enableLongRunningSqlStatements": true,
            "enableSqlInformationDebugger": true,
            "tenant": "default",
            "schemaUpdateMode": "ForceSync"
        },{
            "name": "Debug Test",
            "type": "al",
            "request": "snapshotInitialize",
            "environmentType": "OnPrem",
            "server": "http://ll-bc-at",
            "serverInstance": "BC",
            "authentication": "Windows",
            "tenant": "default",
            "breakOnNext": "WebClient"
        }
    ]
}

I find it a bit odd that I'd have to enter my credentials even though the authentication method is set to Windows, but if I leave the properties securePassword and userName blank I will always get prompted to enter them when trying to debug.

Get-ValueFromALTestRunnerConfig : Cannot process argument transformation on parameter 'ConfigPath'. Cannot convert value to type System.String.

The v0.5.5 changes now causes following error when running the tests.

Get-ValueFromALTestRunnerConfig : Cannot process argument transformation on parameter 'ConfigPath'. Cannot convert value to type System.String.
At C:\Users\joel.james\.vscode\extensions\jamespearson.al-test-runner-0.5.5\PowerShell\Get-DockerHostIsRemote.ps1:2 char:19      
+ ...   $dockerHost = Get-ValueFromALTestRunnerConfig -KeyName 'dockerHost'
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-ValueFromALTestRunnerConfig], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-ValueFromALTestRunnerConfig

I made the following change locally to Get-ALTestRunnerConfigPath to get around the issue.
image

PS: Loved your latest video!! Proper youtuber now, keep 'em coming! :)

No output from the test execution

Hi,
I'm trying to setup and use the AL Test Runner but I'm unable to get any output from the test execution.
What I'm using:

  1. A BC 19.2 instance running on Docker;
  2. Latest BCContainerHelper installed;
  3. Latest AL Test Runner app;

What I've done:

  1. I've installed the AL Test Runner Service and the OData service seems to be exposed;
  2. Setup the config.json file to run tests on the local Docker container

What I get:
When I try to run a test from the Test Explorer, I get the following on the Terminal:
image

I've tried to manually run the Invoke-TestRunnerService.ps1 script and debug it and here's where it stops:
image

You can see that there's no message in the error so I get no output on the Terminal:
image
I was not able to understand why the Invoke-WebRequest is failing.

I have debug the AL Test Runner Service and the TestRunner codeunit (codeunit 79151 "Test Runner JP") is being called but I guess that some error is being retrieved, I just cannot find it.
On the OnAfterTestRun trigger, the Success parameter is False but GetLastErrorText() and GetLastErrorCallStack() returns no error.

I couldn't find any related error in the container Event Viewer log.

Any hint?

EEXIST: file already exists - Workspace an obstacle?

Hi James,
I am trying to use your extension for the very first time, in my local repository running against a local Docker container.
Assuming my repo is located under "PATH\MyRepo", I am working with a workspace including subfolders "PATH\MyRepo\app" and "PATH\MyRepo\test". Needless to say; my tests are located within the test subfolder.

When I try to run my first test using "AL Test Runner - Run Current Test", I receive an error message:

EEXIST: file already exists, mkdir 'PATH\MyRepo\app\.altestrunner'

The .altestrunnner folder has been created in the app folder, not in the test folder.
If I open the test folder in VS Code, there is still no .altestrunner folder.

How to make it work?

There are no results for this test

Hello,

I have ne problem since some weeks. Normaly the background of a test procedure turns from yellow to green or red, when the test has been performed. My old tests are all green. But new tests do't change the colour. The xml is created

<assembly name="5172426 PR Transfer Ship." test-framework="PS Test Runner" run-date="2020-12-21" run-time="07:48:48" total="1" passed="0" failed="1" skipped="0" time="9.873">
  <collection name="Transfer Ship." total="1" passed="0" failed="1" skipped="0" time="9.873" Skipped="0">
    <test name="PR Transfer Ship.:PRTransferShipment_2600" method="PRTransferShipment_2600" time="1.873" result="Fail">
      <failure>
        <message>Validation error for Field: Lot No.,  Message = 'You cannot post a Transfer Shipment because this posting is blocked by rule GU00000006.'</message>
        <stack-trace>"Transfer Line-Reserve"(CodeUnit 99000836).CallItemTracking line 9 - Base Application by Microsoft
"Transfer Line"(Table 5741).OpenItemTrackingLines line 5 - Base Application by Microsoft
"Transfer Order Subform"(Page 5741)."Shipment - OnAction"(Trigger) line 2 - Base Application by Microsoft
"Test Runner - Mgt"(CodeUnit 130454).RunTests - Test Runner by Microsoft
"Test Runner - Isol. Codeunit"(CodeUnit 130450).OnRun - Test Runner by Microsoft
"Test Suite Mgt."(CodeUnit 130456).RunTests - Test Runner by Microsoft
"Test Suite Mgt."(CodeUnit 130456).RunSelectedTests - Test Runner by Microsoft
"Command Line Test Tool"(Page 130455)."RunSelectedTests - OnAction" - Test Runner by Microsoft</stack-trace>
      </failure>
    </test>
  </collection>
</assembly>

image

Test codeunits with comment lines do not show up in Test Explorer

While creating a new test codeunit, I noticed the 'Run Test' did not work, neither did the file appear in the Test Explorer. Found out the reason why...

Originally, I created my codeunit as

// Also see codeunit "NVT Goods Lines Import Tests"

codeunit 2060640 "NVT WMS Imp. Order Lines Tests"
{
    Subtype = Test;

while changing to the below, all works fine.

codeunit 2060640 "NVT WMS Imp. Order Lines Tests"
{
    // Also see codeunit "NVT Goods Lines Import Tests"

    Subtype = Test;

Worth fixing?

Test cases Code Coverage portion not showing any results

Hi,

I ran the ALTestRunner App, for few of my test cases, I am getting execution results in Results folder as an xml file.

But, I not getting any code review portion of results, to verify which code executed. Please find the attached screen.

Let me know, if i miss any steps.

image

setting.Json
image

config.json
{
"containerResultPath": "C:\ProgramData\BcContainerHelper\Extensions\test\my",
"launchConfigName": "test",
"securePassword": "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000052feaf62e6a3e4ca7bf7574b93374370000000002000000000003660000c00000001000000056db47761b135d9356c8b9c4c458153e0000000004800000a000000010000000c8d8423ad4d5788ce96133722cb5b7d908000000a72e63acf3b509bf14000000c9ac2c5b4a64b6d3aa8524f0b582ff2e20591d5c",
"userName": "dev",
"companyName": "CRONUS USA, Inc.",
"testSuiteName": "",
"vmUserName": "",
"vmSecurePassword": "",
"remoteContainerName": "",
"dockerHost": "",
"newPSSessionOptions": "",
"testRunnerServiceUrl": "http://test:7048/BC/ODataV4/TestRunner?company=My%20Company\u0026tenant=default",
"codeCoveragePath": "./test/.altestrunner//codecoverage.json"
}

Unpublish after test

Hi,

I'd love to have the option to unpublish the Test-App after my test run. In BC14 I'm sadly forced to unpublish via powershell after executing my tests. This would enhance my workflow quite a bit during TDD. Usually I'd write a PR but I have too many tasks as is. Thanks for considering it.

Cheers Leon

Feature request: add Filename and SelectionStart as parameters to VS Code commands

Hi,

Love this extension so far, I'd like to integrate the runner parts into AL Object Designer.

Could you add these optional parameters to below commands?

  • filename: altestrunner.runTestsCodeunit, altestrunner.runTest
  • selectionStart: altestrunner.runTest

So I'd be able to initiate the test runner like this:

vscode.commands.executeCommand('altestrunner.runTest', fileName, selectionStart);

My idea is to list available tests and run them using the context menu.
image

Thanks,
Marton

Test Codecoverage shows 0%

I configured the code coverage like you described in your blog but the overview of codecoverage always says that 0% were hit.

image

Although in the generated codecoverage.json file there are hit lines.
image
image

I also tried "Toggle Code Coverage" but it does not show anything.


image
Workspace:
image
User Settings:
image

image

image

Task Scheduler Warning

Hey James,

I'm wondering about the task scheduler warning.
Had no trouble with it being enabled in all of my tests. Could you make it optional f.e. with a boolean in the config or a user setting?

Workspace / multiple app handling

Hi,

First of all, I really like the approach of creating an inside-vscode test runner! Great job!!!

Unfortunately I ran into a problem when using developing multiple apps in a vscode workspace. It seems like al-test-runner does not recognize that I switched the folder. The commands always try to start the previous app folder I tested against.
When I kill the terminal session the new session is at the right folder. Additionally it seems that the result display also doesn't work with multiple folders.

If you need additional information pls let me know...

/ chris

Get-ServerFromLaunchJson does not work with explicit port

When server uses explicit port (i.e. 23171), then the port is considered as a part of server name (docker container name).
That is wrong.
Server name (docker container name) is only "MYSB", see the sample bellow.

{
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"name": "MYSB",
"server": "http://MYSB:23171/",
"serverInstance": "BC",
"authentication": "UserPassword",
"breakOnError": true,
"launchBrowser": false,
"enableLongRunningSqlStatements": true,
"enableSqlInformationDebugger": true,
"schemaUpdateMode": "ForceSync",
"port": 23771
}
]
}

Error occurred (ScriptHalted)

First tome coming across this error: Error occurred (ScriptHalted)

Working on the 2nd edition of my book I am running the test for the first time with the AL Test Runner. The test run OK in the AL Test Tool, but throw this error when run with the AL Test Runner.

This is the full output in VSCode:

Invoke-ALTestRunner -Tests All -ExtensionId e26890f8-fafe-49c6-8951-2c1457921f9b -ExtensionName "LookupValue"
Running tests on Bc18w1UserPw, company CRONUS International Ltd., tenant default, extension LookupValue
ClientSession State is Uninitialized (Wait time 10 seconds)
At C:\ProgramData\BcContainerHelper\Extensions\Bc18w1UserPw\PsTestTool\ClientCo
ntext.ps1:250 char:21
+ ...             throw "ClientSession State is Uninitialized (Wait time $w ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (ClientSession S...ime 10 seco
   nds):String) [], RuntimeException
    + FullyQualifiedErrorId : ClientSession State is Uninitialized (Wait time
   10 seconds)

Error occurred (ScriptHalted)
Testing company set in config file exists in the container
Running tests on Bc18w1UserPw, company CRONUS International Ltd., tenant default, extension LookupValue
ClientSession State is Uninitialized (Wait time 10 seconds)
At C:\ProgramData\BcContainerHelper\Extensions\Bc18w1UserPw\PsTestTool\ClientCo
ntext.ps1:250 char:21
+ ...             throw "ClientSession State is Uninitialized (Wait time $w ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (ClientSession S...ime 10 seco
   nds):String) [], RuntimeException
    + FullyQualifiedErrorId : ClientSession State is Uninitialized (Wait time
   10 seconds)

Error occurred (ScriptHalted)
Testing company set in config file exists in the container

publishBeforeTest is not triggering

Hi,

I'm finally giving the extension another try but the "al-test-runner.publishBeforeTest" setting doesn't seem to be respected,

I've tried "Publish" and "Rapid application publish" without any effect - running a test (procedure, codeunit and all tests) works but it doesn't pick up changes in code which indicates nothing was ever published.

I'm running the latest version of AL Test Runner (0.4.3) in VSCode (1.52.1) with AL Language (6.1.381) for BC 17.2 with BCContainerHelper (1.0.16).

Please let me know if I can provide you with more info, I'd love to be able to help.

Config.json location or last.xml

Hi James,
I'm testing the test runner with my BC v14.
It works fine, if I use the default setup where it puts the .altestrunner and config.json in the app root folder.
But when I then try to publish the app again after running the test, then the AL compiler fails, because it thinks that last.xml is another permission xml file.

When I then move the .altestrunner folder into the apps parent folder, then I can compile/publish, but when running the test runner again, then it cannot find the config.json and creates a new empty file.

Our workspace/repo folder is like this:
\Apps\OurApp\app.json
\Apps\OurApp\source
\Apps\OurApp\tests

It creates the config.json in \Apps\OurApp.altestrunner, while I would like it to be in either \Apps.altestrunner or .altestrunner to avoid the compiler problem.

Note: Tests and regular objects are in the same app when using VSCode, since v14 does not like having it in two Apps. We split the files as part of our build pipeline.

bccontainerhelper not navcontainerhelper

I got these error message (sorry, in german) while I want to start the tests or one test:
image
It says that there is no module like navcontainerhelper. And thats correct because I have installed bccontainerhelper.
Is that currently a problem? :)

CompanyName is NULL

Hi Jimmy,

I currently can't use the Tool because I get the following Error:

Invoke-RunTests : Das Argument kann nicht an den Parameter "CompanyName" gebunden werden, da es NULL ist.
.vscode\extensions\jamespearson.al-test-runner-0.4.0\PowerShell\Invoke-ALTestRunner.ps1:82 Zeichen:21
+     Invoke-RunTests @Params
+                     ~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-RunTests], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Invoke-RunTests

I tried including the tenant in my launch json after I saw that multi tenancy was added in a PR but nothing changed.

Regards Leon

Suggestion: "Publish and Run Current Test"

When I am modifying a test function and I now want to test the new result, I easily forget that "Run Current Test" won't give me the correct result, since my code changes are not uploaded to the database yet.

Wouldn't it make sense to provide something like "Publish and Run Current Test"?

Commented test functions are decorated

Test functions that are commented out are still decorated with "missing tests". Not a big issue, but I figured, I'll let you know.

Repo:

Create a function in a test codeunit as follows:

/*
[Test]
procedure MyTest()
begin
end;
*/

Run Tests creates new AL file?

Trying to get started with the AL Test Runner on a new machine, and I always get a new .al file when trying to Run Tests?
Any clue what could be interfering? (other VS Code extension, missing setting, ...)

NewFile

invoke-ALTestRunner

'Invoke-ALTestRunner' is not recognized as an internal or external command

What mus I do for getting this to work?

Test Result Highlighting Wrong Test Method

Two tests, the name of one of the tests is also the start of another test e.g.

RegisterWhseJnlLineWithoutContainerNo
ReigsterWhseJnlLine

The highlighting for both tests is being applied to the declaration of the first test.

Running tests locally

Hi and thanks for a great extension!
I've been wondering for a while if it's possible to run the tests locally instead of in a container?

I know it's docker-based:
https://github.com/jimmymcp/al-test-runner/blob/master/PowerShell/Invoke-RunTests.ps1

which invokes:
https://github.com/microsoft/navcontainerhelper/blob/master/AppHandling/Run-TestsInNavContainer.ps1

which then uses:
https://github.com/microsoft/navcontainerhelper/blob/master/AppHandling/PsTestFunctions.ps1

So I've been wondering if the local option would be possible by optionally running the scripts straight from PsTestFunctions instead of doing it inside a container?
This is generally a question if it's possible and how you would approach it in this repo, would I even be able to submit a PR?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.