web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

When should I use a TestRunner in Business Central AL?

(3) ShareShare
ReportReport
Posted on by 48
I have a question about TestRunner usage in Business Central AL.
 
I know that test codeunits can be executed through the Test Tool. But where and when do you use a TestRunner codeunit?
 
I understand that it can be called with Codeunit.Run, but I am not sure in which scenarios this is actually needed.
Is a TestRunner mainly for automation, for example in pipelines or custom execution flows, or does it also have a purpose during normal development?
 
In short: When should I use a TestRunner instead of just running test codeunits directly in the Test Tool?
 

Thanks in advance for your help!

I have the same question (0)
  • Gerardo Rentería García Profile Picture
    25,975 Most Valuable Professional on at
  • Suggested answer
    YUN ZHU Profile Picture
    99,611 Super User 2026 Season 1 on at
    In the latest version, you can run tests while developing.
    Business Central 2026 release wave 1 (BC28): Run AL tests from Visual Studio Code (Test codeunits and test methods)
     
    Thanks.
    ZHU
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,283 Super User 2026 Season 1 on at
    It acts as the execution engine that runs your test cases and manages how they are executed.
  • Suggested answer
    OussamaSabbouh Profile Picture
    13,852 Super User 2026 Season 1 on at
    Hello ,
    Use a TestRunner only when you need to orchestrate tests, not just run them. For normal development, the Test Tool (and now also VS Code test execution) is usually enough for running/debugging test codeunits directly. A TestRunner becomes useful when you want custom behavior around the run itself, like choosing and ordering test codeunits, doing setup/cleanup with OnBeforeTestRun and OnAfterTestRun, capturing/logging results, controlling rollback/isolation with TestIsolation, or integrating with automation/unattended execution such as pipelines. So in practice: manual dev work = Test Tool/VS Code, custom flow or automation = TestRunner.
    Regards,
    Oussama Sabbouh

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,065 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,132 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 703 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans