Default test handlers
Default test handlers
Regular test handlers are declared by the test codeunit, while default handlers run on every test, including tests from other apps. They suit telemetry setup or running Microsoft test suites against your extension.
Area: Developer tools. Status: GA. Developer relevance: high. Airtime: 2 min across 2 videos, demoed.
Status evidence
- Nothing said about status; launch event convention: generally available unless stated otherwise.
Where they talk about it
- What's new in AL and Tools: 24:55 to 25:47, demo at 24:55
- What's new: Testability Enhancements: 5:26 to 6:13, demo at 6:24 (called "Opt-in and default (global) test handlers" there)
Quotes
- 5:26 "default test handlers uh or I like to think of them as global test handlers because they run on every single um test" - Describes the design of default handlers, which run on every test.
- 25:29 "So I have the flexibility of handling things outside the test case in a common way both globally but also specifically for a specific test code unit." - Summarizes that test handlers work at both global and per-codeunit level.
Caveats mentioned
- A warning appears when only some methods are implemented because there is a default implementation that must be overridden for custom behavior
Prerequisites mentioned
- Enum extension of the default test handlers enum with an implementation of the test handler
Documented features match
- Build extensible and data-driven AL test suites - medium confidence (llm). Docs say: General availability, roadmap id 573333. Lifecycle handlers
- Product documentation: Create test codeunits and test methods, checked 2026-10-02. To register a handler for every test codeunit, add its mapping to an extension of DefaultTestHandler instead. Default handlers run before handlers registered on a test codeunit. Note: Section marked 'APPLIES TO: Business Central 2026 release wave 2 and later'; available in preview with prerelease runtime 18 / server 29.
Docs checked on 2026-10-02: the match is against Microsoft's what's new pages for the wave as they were on that date. Microsoft keeps filling the documentation, so "no documented item" can go stale.
Tags: al, testing, test-handlers, telemetry, enum
Generated by pipeline step 06. Source: YouTube auto-captions of the launch event videos, see the deep links. Not official.