一键导入
run-tests
Execute AL test codeunits. Use al-runner for fast pure-logic tests (no BC required). Use bc-test for full integration tests against a running BC instance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute AL test codeunits. Use al-runner for fast pure-logic tests (no BC required). Use bc-test for full integration tests against a running BC instance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | run-tests |
| description | Execute AL test codeunits. Use al-runner for fast pure-logic tests (no BC required). Use bc-test for full integration tests against a running BC instance. |
| Tool | When to use | BC required? | Speed |
|---|---|---|---|
al-runner | Pure-logic unit tests (in-memory tables, no pages/HTTP/events) | No | Milliseconds |
bc-test | Full integration tests against a running BC instance | Yes | Seconds–minutes |
Full AI agent guide:
al-runner --guide
Basic usage:
# Run all tests
al-runner ./src ./test
# With symbol packages
al-runner --packages .alpackages ./src ./test
# With stubs for unsupported dependencies
al-runner --packages .alpackages --stubs ./stubs ./src ./test
# Run a single test procedure
al-runner --run TestMyProcedure ./src ./test
# With coverage report
al-runner --coverage ./src ./test
# Machine-readable JSON output
al-runner --output-json ./src ./test
# JUnit XML for CI
al-runner --output-junit results.xml ./src ./test
Exit codes:
| Code | Meaning |
|---|---|
| 0 | All tests passed |
| 1 | Real assertion failures |
| 2 | Runner limitations only (compilation gaps, missing mocks — not real failures) |
| 3 | AL compilation error |
Use exit code 2 to distinguish runner gaps from real failures in CI.
What al-runner supports: in-memory tables, CRUD, filters, cross-codeunit calls, interfaces, asserterror, JSON types, BLOB/InStream/OutStream, RecordRef/FieldRef, IsolatedStorage, TextBuilder, and more. See al-runner --guide for the full list.
What al-runner does NOT support: Pages, Reports, XMLports, HTTP calls, event subscribers. Inject these via AL interfaces or use --stubs.
Expects bc-test on PATH (from bc-linux or bc-tools).
bc-test --help
Use when tests require BC's service tier, events, UI flows, or features not supported by al-runner.
$ARGUMENTS and pass through to the selected tool.dev/<task-slug>/), capture output to .dev/<task-slug>/test-results.txtSubtype = Test and mark procedures with [Test].Run mutation testing against an AL project using al-mutate (MSDyn365BC.AL.Mutate). Identifies test gaps by applying AST-based mutations and checking whether the test suite catches them via al-runner. No BC instance required. Produces mutations.json and report.md.
Download AL symbol packages (.app files) for the current project's dependencies from Microsoft NuGet feeds. Reads app.json to determine required packages.
Look up Business Central base application source code (tables, pages, codeunits, events) from MSDyn365BC.Sandbox.Code.History. Use this to verify object structures, find event publishers, or check field definitions.
Quick reference for AL build pipeline. Auto-load when compilation, deployment, or testing is mentioned. For running commands, use /compile, /publish, or /run-tests.
Compile the AL project using al-compile. Runs analyzers, reports errors, and writes diagnostics to the task folder.
Implement AL/BC solution using parallel development agents and 4-specialist review team. Spawns N developer agents for parallel modules, then 4 reviewer agents for comprehensive code review.