Skip to main content

Test Toolkit in Business Central(SaaS) - How to setup and execute Custom Test Cases

Test Automation is basically writing code to test and verify whether the application functionality developed works as expected. When you install NAV / Business Central - OnPremise, the installation folder consists of standard Test Toolkit Objects which are to be imported manually if you want to enable Test Automation in your project. But, for Business Central (SaaS) it comes pre-installed.  Let us see how Test Automation is done in Business Central(SaaS) with the help of Test Toolkit and how to set up your own test cases for the customization you've developed for the system.

Books & Reference:
1. Automated Testing in Microsoft Dynamics 365 Business Central (
Microsoft Dynamics Business Central (SaaS)
VS Code(
AL Language Extension(

1. Checking the installed Test Toolkit in Business Central(SaaS):
When searching for Test Tool in Business Central(SaaS) global search, I didn't find any results.

I checked the Permission Set and its permissions for the User.

Checking the Permissions for the SUPER Permission Set

This only means that either the Object for Test Toolkits are not present or their not accessible directly.
Let us try calling through URL. Append &page=130401 in the URL

Nice!! 😁. Which means that Test Toolkit is not directly accessible through global search.

2. Setting Up Test Toolkit in VS Code:
In the existing app or a new app, you can add a test version parameter in 'app.json' file and download the symbol to get the object reference symbols for Test Toolkit.

3. Creating your own custom Test Toolkit App:
In this, you create your own codeunit to test the cases
SubType = Test which means that this codeunit is to be involved in Test Toolkit. Refer(
To get the procedure into Test Toolkit,you have to type [Test] before the procedure just like Event Subscribers

Getting the procedure into the Test Tool

Finally running the function and getting results

Update: 26th August 2020
This functionality is not present in versions 15 and above.

This is how you can do Test Automation in Business Central. In the upcoming blogs, I will try to get into more details.
Happy Weekend :) Cheers!


Note: After referring through I've understood that SUPER permission is not the right one to run the test toolkit.
I will blog about this change in the upcoming blogs.
Staedter said…
Unfortunatley this is no longer working for the new BC15 and later TestApps and I dont know of any good way to way to accomplish this in the Cloud.

Maybe someone else knows how to do it for Business Central Sandbox (SaaS)?
Hi Staedter,
Yes I have noticced that Test Toolkit doesn't download from the SaaS version.

You can do this through BC 15 Container. Refer Freddy's Blog

Popular posts from this blog

Understanding and How to use APIs Business Central - 2

In my last blog post (Business Central API -1 ) on Creating API in Business Central, we discussed all the commonly used properties of the page, query, and controls like field and data-item. In today's blog, we will be diving deeply into the validation of the data passed through the API endpoint, how it enters into the source tables and is manipulated to be inserted/modified into single or multiple tables.
Also, I will be demonstrating how APIs are to be used.

Microsoft Dynamics Business Central (SaaS)VS Code( Language Extension( V1 from Business Central On-Premise DVD
Books & References:
API V1 from Business Central On-Premise DVDAPI(V1.0) for Business Central (Click Here)API(Beta) for Business Central (Click Here)
Understanding API in Business Central 1. BINDSUBSCRIPTIONS: Use to trigger IntegrationEvent for the Codeunit stated in parameters whenever the function calling BI…

Creating APIs in Business Central - 1

While writing a blog on Automated Testing in Business Central, I was going through sample apps provided by Microsoft and realized that the complexity is nowhere close to what examples Microsoft has provided on In this blog, I will try to explain how APIs work and how to be creative with the implementation. Also, an API which were in beta are finally out with version V1.0 in the April 2019 release let's see some important key things from development aspects.
This blog is going to be theoretical one kindly bear with me.

Microsoft Dynamics Business Central (SaaS)VS Code( Language Extension( V1 from Business Central On-Premise DVD
Books & References:
API V1 from Business Central On-Premise DVDAPI(V1.0) for Business Central (Click Here)API(Beta) for Business Central (Click Here)

Key Requirements:
API source table must have an Id(GUID) field per record for m…

Enum Object in Business Central - How to create and how to extend!

Since the dawn of Business Central Era (2nd April 2018 - Today), there are many new data types introduced by Microsoft.
One such data type is Enum(Enumeration). Essentially, what enumeration is having a single select value with multiple options at a given time!
Well, I know what your thinking what about the 'Option' data type.
Anyways, enough of talking let's just dive in!

Disclaimer:The knowledge in this blog is true and complete to the best of authors and publishers knowledge. The author and publisher disclaim any liability in connection with the use of this information.
Microsoft Dynamics Business Central (SaaS or On-Premise)
VS code with AL Language extension

1. Enum as an Object:
Just like Tables and Pages, Enum behaves like an Object.
Note that Extensible means that the Enum Object can be extended in another module. By default, this property is set to TRUE.

Enums and Enum Extensions behave differently. They follow a different number se…