HodorNV / ALOps

ALOps
59 stars 24 forks source link

Feature Request: Ability to set TestRunner as parameter on ALOpsAppTest #518

Closed lvanvugt closed 2 years ago

lvanvugt commented 2 years ago

Suggestion With reference to the issues #310 and #365 I would like to suggest to add a parameter to ALOpsAppTest to enable me to set a test runner codeunit, so, that my test can, for example, be run with test isolation disabled.

Issue As you might know the test runner codeunit is selected on the AL Test Tool page (either 130451 or 130455) and by default this is 130450 - Test Runner - Isol. Codeunit. Testing, for example, APIs I need to run my tests with test isolation disabled, using 130451 - Test Runner - Isol. Disabled. Issue #365 discussed this and the suggestion is to build and install codeunit that sets everything up. Indeed a working approach. This, however, disables the usage of the extensionId as discussed on (and consequently implemented) #310. This leaves me with two approaches:

  1. When using default test runner I use ALOpsAppTest with extensionId
  2. When needing to disable the test isolation I need to provide an install codeunit to setup the test suite and select test runner

Solution It would be of great help (and simplify our setup a lot) if ALOpsAppTest enables this all be letting me provide it the test runner codeunit id. This way my pipelines are consistent and I do not need to have different setup.

lvanvugt commented 2 years ago

@waldo1001, you might recall my DDC presentation on testing APIs related to chapter 13 of my book (and the one I also recorded for Areopa https://www.youtube.com/watch?v=xKnYtdiAG0A). The approach I took was based on how MS was tackling it. You suggested this probably could be done much easier. For this I created two issues on the GitHub repo of the book. One regarding the authentication and the other on test isolation.

The first one has been solved by the solution Arthurvdv suggests, the second one would be solved with the feature suggestion above.

waldo1001 commented 2 years ago

It's on the list after we have finished some other prio items.. .

waldo1001 commented 2 years ago

To be released as an extra parameter in the Test-task

AdminHodor commented 2 years ago

Dear @lvanvugt,

The fix was released today in ALOps v1.450. Could you please validate?

Testrunner Codeunit can be set with parameter [testrunnercodeunitid]

Kind regards,

lvanvugt commented 2 years ago

@AdminHodor / @waldo1001

Due to summer holidays and change of job had not yet come to verify this on my side. Today, I finally got to do this and tested:

Works as expected.