Microsoft presents: Tests, dependencies, runners and evals for BC applications
Microsoft session on testing Business Central apps: propagated dependencies, test explorer support in AL, new test codeunit properties, internal visible to, AI test agents, and data-driven AI tests and evals. Also covers CI/CD test selection, MCP-based test execution and token consumption. Native data-driven tests are not yet in the product.
- Testing overview and roadmap
- Deterministic tests and propagated dependencies
- Application test library and real-world usage
- Internal visible to and test facades
- Test explorer support and properties
- Inner loop and outer loop testing
- AI test agent and interactive testing
- Defining AI tests and data-driven approach
- Artifacts, multiple runs, and copilot feature testing
- Native data-driven tests and test automation strategies
- Test selection, coverage, inner loop optimization, and dependencies
- MCP server, test explorer, token consumption, and model optimization
Overview
The session from BC TechDays covers deterministic testing in AL and then moves to testing AI features. It demos propagated dependencies for refactoring apps without breaking external contracts, the application test library, internal visible to for test facades, and test explorer support that runs and debugs tests in the editor without a custom AL test runner. New test codeunit properties cover required permissions, test type and test isolation.
The second half covers AI. It shows an agent that writes tests interactively in GitHub Copilot Chat, and it separates AI tests from agent tests. AI tests use data sets of input, prompt, model and expected-outcome permutations, with repeated runs because results are non-deterministic. It also covers test selection by type and coverage, MCP server execution, token consumption tracking and model choice for cost.
Key points
- Propagated dependencies lift dependencies as proxies in the manifest so apps can be split without breaking external contracts. They work for one level only and cannot point to another propagated dependency.
- Test explorer support in AL runs and debugs tests in the editor, with results, call stacks and assert messages inline. It needs codeunits marked with the test attribute.
- New test codeunit properties cover required test permissions, test type (unit or integration) and required test isolation, to support test explorer and CI/CD pipelines.
- Internal visible to exposes internal procedures to specified apps, for example test facades. Anyone can specify an app ID in production, which the speaker flags as a security concern.
- AI tests use data sets with permutations of inputs, prompts, models and expected outcomes, and are rerun several times because AI output is non-deterministic. Copilot feature tests run in the eval suite, not the standard test tool.
- Native data-driven tests with test data source attributes and a custom context interface are not part of the product yet. They may be in a pre-release.
- Tests that use GUI-related code behave differently when run from VS Code versus the client. This is a known issue; for now use the classic test explorer in the client or the PowerShell cmdlets.
Features
| Feature | Status | At | Evidence |
|---|---|---|---|
| Test Explorer support | status not stated, demoed | 7:54 | |
| Propagated dependencies | status not stated, demoed | 2:17 | |
| Test library properties | status not stated, demoed | 8:05 | |
| Internal visible to property | status not stated, demoed | 4:59 | |
| AI test agent | status not stated, demoed | 12:23 | |
| AI test with data-driven permutations | status not stated, demoed | 16:55 | |
| AI test artifacts and multiple executions | status not stated, demoed | 19:02 | |
| Copilot feature testing framework | status not stated, demoed | 20:35 | |
| Agentic test simulation and step verification | status not stated, demoed | 23:31 | |
| Native data-driven test support | generally available (roadmap Build extensible and data-driven AL test suites), demoed | 25:06 | |
| Custom context interface for data-driven tests | announced, demoed | 26:31 | “This is what we have planned um for the pipeline for coming release” (28:06) |
| Agent-assisted test writing and review | status not stated | 28:33 | |
| Performance test suite for long-running tests | status not stated | 29:18 | |
| Test type filtering with subtype and transaction filters | status not stated | 31:33 | |
| Test code lens for developers | status not stated | 32:11 | |
| BTE code for faster inner loop testing | status not stated | 32:44 | |
| Test isolation improvements with empty company | status not stated | 36:53 | |
| MCP server for test execution | status not stated, demoed | 38:19 | |
| AI test runner with token consumption tracking | status not stated, demoed | 39:38 | |
| Test optimization through model and instruction tuning | status not stated | 40:36 | |
| Running tests from VS Code | status not stated | 41:48 | |
| Test generation with MCP and external tools | status not stated | 39:07 |
A status with a roadmap link comes from the Microsoft 365 roadmap feature this part of the video covers (matched by Haiku; links Opus dropped are not used); other statuses need a status word in the video itself.
AL objects mentioned
As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.
- codeunit “test library” at 3:44
- codeunit “test good unit” at 3:44
- other “application test library” at 4:36
- codeunit “good unit” at 14:10
- codeunit “search gel account” at 20:35
- codeunit “installation code unit” at 21:59
- other “payables agent” at 20:50
- other “library agent” at 23:57
Not found in BC28-30: codeunit “test library”, codeunit “test good unit”, codeunit “good unit”, codeunit “search gel account”, codeunit “installation code unit”.
Quotes
- 0:16 “so the the the question that we want to answer is does it still work and will it work in production right so what”
- 2:56 “One thing to note here about propagated dependencies is that it only works for one level.”
- 5:28 “One thing to note here is that there is a security concern in the sense that anybody can specify to have this app ID”
- 7:54 “As you might have seen from the uh the keynote, we now have support for the test explorer”
- 8:33 “we have added the test type uh property to it as well which signals the scope of the uh the test in this code”
Disclaimers in the video
- 12:07 preview: there is another version that is more interactive and there’s a version that we tested in the BC bench
- 25:06 not-in-this-release: native support for datadriven tests is not part of the the product yet but you might be able to find it in a pre-release
- 28:06 coming-later: This is what we have planned um for the pipeline for coming release
- 32:44 coming-later: we’re looking forward to that inner loop optimization for us as developers
- 42:34 not-in-this-release: from now until we fix that or get that problem solved, uh you need to use the the classic test …
Presenters (as heard): Thomas, Arthur, Stefan, Espen, Freddy.
