The standard Microsoft Dynamics 365 Business Central test collateral contains over 33,000 by now (January 2021) automated test that cover the most part of standard functional areas like G/L, Sales, Purchase, Manufacturing, etc. If your solution has been extending any of this it makes perfect sense to get these standard tests running on your solution. As described in various posts on my blog regarding testability it's not that difficult to get that going as in most cases it's all about data.
This repo contains three parts all to be found the TestFixtureInitializer folder.
- an .al extension suggestion (in TestFixtureInitializer\App) to setup prebuilt, shared and (generic) fresh fixture to get standard MS tests run on your solution.
- an .al extension (in TestFixtureInitializer\Test) that contains logic to setup a test suite DEFAULT containing the tests of the MS standard tests apps that have been deployed to the database
- Azure DevOps pipelines definitions based on ALOps to deploy and run MS test app(s)
With respect to the first part this schema shows how the various parts relate to each other:
Find a more detailed description on my blog. Feel free to make use of the code, and share your suggestions for improvements by means of an issue report.
The second and third part have been effectuated as Azure DevOps pipelines. You will find a pipeline per test extension, but also 6 batches of MS test apps that could be combine as at this very moment not all MS test apps can coexist in one test suite (see more detailed info below).
- If a test app is marked as excluded this means that is can not be combined with the ones included as one or more tests do fail in that batch after it has been added.
- Tests-Local for w1 does not contain any tests, so, has not been included in any of the batches
The following batches constitute out of those test apps that do not influence each others tests and only disable tests that needed to be disbled to run each test app without errors on its own. Below them 4 individual test apps are listed as these coud not be part of any batch for reasons already mentiond, or, as with ERM and SCM, they are to big already.
Including | Excluding | |
---|---|---|
Tests-Cost Accounting | ||
Tests-CRM integration | ||
Tests-Fixed Asset | ||
Tests-General Journal | ||
Tests-Rapid Start | ||
Tests-Resource | ||
Tests-Reverse |
Including | Excluding | |
---|---|---|
Tests-Bank | ||
Tests-Data Exchange | ||
Tests-Marketing | ||
Tests-Permissions | ||
Tests-SMTP |
Including | Excluding | |||
---|---|---|---|---|
Tests-Invoicing | ||||
Tests-Job | ||||
Tests-Upgrade |
Including | Excluding | |
---|---|---|
Tests-Dimension | ||
Tests-Graph | ||
Tests-Integration | ||
Tests-Monitoring Sensitive Fields | ||
Tests-Physical Inventory | ||
Tests-User |
Including | Excluding | |
---|---|---|
Tests-SMB | ||
Tests-Workflow |
- Tests-Report and Tests-Misc do not go together
- Tests-Report and Tests-Workflow do not go together
Including | Excluding |
---|---|
Tests-Prepayment | |
Tests-Report |
- Tests-Report and Tests-Misc do not go together
- Tests-Report and Tests-VAT do not go together
Including |
---|
Tests-Cash Flow |
- no need for a separate batch .yml, DisabledTests.json and pipeline; these do already exist
- (1) .yml (2) DisabledTests.json (3) pipeline
- contains 389 tests (of which 22 fail today when all Cash Flow tests are run in one stretch)
- Tests-Cash Flow can not be combined with other MS test app as it messes up many tests of other MS test apps (tested for Tests-Dimension, Tests-Graph, Tests-Integration, Tests-Invoicing,Tests-Marketing, Tests-Misc, Tests-Permissions)
Including |
---|
Tests-ERM |
- no need for a separate batch .yml, DisabledTests.json and pipeline; these do already exist
- (1) .yml (2) DisabledTests.json (3) pipeline
- Tests-ERM should not be combined with any other MS test app as it
- messes up many tests of all other MS test apps
- contains almost 9000 tests (of which almost 1200 fail today when all ERM tests are run in one stretch) and execution takes more than long enough to keep this separate (4h5m on Standard E4as_v4 (4 vcpus, 32 GiB memory) Azure VM)
Including |
---|
Tests-Misc |
- no need for a separate batch .yml, DisabledTests.json and pipeline; these do already exist
- (1) .yml (2) DisabledTests.json (3) pipeline
- contains 3,156 tests (of which 349 fail today when all Misc tests are run in one stretch)
- Tests-Misc can not be combined with other MS test app as it messes up many tests of other MS test apps (see exclusions mentioned in batches 1-6)
Including |
---|
Tests-SCM |
- No need for a separate batch .yml, DisabledTests.json and pipeline; these do already exist
- (1) .yml (2) DisabledTests.json (3) pipeline
- it seems wise not to combine Tests-SCM with any other test app as it contains almost 9300 test and execution takes more than long enough to keep this separate (4h20m on Standard E4as_v4 (4 vcpus, 32 GiB memory) Azure VM)
- today almost 400 tests do fail when all SCM tests are run in one stretch
Including |
---|
Tests-VAT |
- no need for a separate batch .yml, DisabledTests.json and pipeline; these do already exist
- (1) .yml (2) DisabledTests.json (3) pipeline
- contains 928 tests (of which 13 fail today when all VAT tests are run in one stretch)
- Tests-VAT can not be combined with other MS test app as it messes up many tests of other MS test apps (see exclusions mentioned in batches 1-6)