How do we include the test libraries from https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-extension-advanced-example-test#writing-the-tests in an app,json file for an extension for a Business Central 15.0 SaaS instance? In the current documentation, it says to add a “test” field with value of “18.104.22.168” to the app.json file. In BC 15.0, this is not working.
The “Test” property in the App.json is just as the “Application” and “System” property is used to specify the minimum version of the symbol files your app requires. These symbols allow you to use C/Side objects. You only need specify “Test” then you have not already imported the test toolkit (with symbols generation enabled).
It’s not working like that in BC 15. Here we no longer have a Test and Application property in app.json, only a “platform” (system). We no longer have C/Side.
Instead you need to specify this as dependencies to a “Base Application”, “System Application”, plus whichever part of the new extension based test toolkit.
You can see an example on how it could be here:
This example have dependency to a number of test extensions (Any, Tests-TestsLibraries, Library-Assets, Test-Runner etc.), but that’s only a few of the new test extensions. Which ones you need depends on your test code. “Any” for example is used to generate Random numbers and Library-Assets have the much used Assert function.
Thanks for the info. Erik. I believe this solution is the right direction for docker container BC instances. I still don’t believe we have the right solution for importing test libraries into BC SaaS instances.
Would be really helpful if anybody can guide here.
To get the test libraries into a Docker container, use the -includeTestToolkit parameter in the New-BCContainer Cmdlet
I’m having the same problem. Seems that libraries are appropiate to be used into an onPremise installation, but I’m not able to installd them into a SaaS instalation…
Is not possible to do tests into an SaaS environment without default MS test libraries??