AL Language Tests: An Executable Spec for How BC Actually Behaves
The BusinessCentral.AL.Language.Tests repository creates an executable specification of AL language behavior by running tests against real BC service tiers across multiple versions. It ensures AL Runner (an AL emulator) behaves accurately and provides a reference for undocumented AL features verified by CI.
Read it hereOpen in Claudehttps-stefanmaron-com-posts-al-language-tests-executable-spec--79efdf9030.md
post Stefan Maron
"The test gets written and verified against real BC before touching the emulator's code, so the fix targets confirmed behavior, not a guess."
Key points
- AL Runner is an emulator that speeds up tests but must match real BC behavior to be trustworthy
- The test repository runs CI against actual BC service tiers (versions 27.0 through 28.4) to verify language behavior
- Tests are written against real BC first, then used to fix the emulator, preventing fixes from targeting incorrect assumptions
- The CI matrix expanded from two versions to eight to catch version-specific bugs that only appear in certain BC releases
- The repository serves as executable documentation and catches when Microsoft changes existing behavior
Quotes
- “The test gets written and verified against real BC before touching the emulator’s code, so the fix targets confirmed behavior, not a guess.” (Explains the critical workflow ensuring fixes are based on actual BC behavior, not assumptions)
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
- other “AL Runner”
- other “BusinessCentral.AL.Language.Tests”
Context
- Features: AL language emulation, automated testing, CI/CD validation, cross-version testing, record behavior validation, xRec snapshot handling, nested validate trigger handling
- Versions: 27.0, 27.3, 27.5, 28.3, 28.4
Source: Stefan Maron, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.