Skip to content

RunTests action - #2343

Draft
spetersenms wants to merge 8 commits into
microsoft:mainfrom
spetersenms:spetersen/separateTestAction
Draft

RunTests action#2343
spetersenms wants to merge 8 commits into
microsoft:mainfrom
spetersenms:spetersen/separateTestAction

Conversation

@spetersenms

@spetersenms spetersenms commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Introduces a new opt-in RunTests action that moves normal test execution (testFolders) out of the RunPipeline action. When useSeparateTestAction is true, RunPipeline compiles, publishes and installs apps and keeps the build container alive, but skips normal tests; the RunTests action then runs those tests against the same container and produces TestResults.xml. BCPT and page scripting tests are unchanged. Behavior is unchanged when the setting is false.

Includes the new setting (ReadSettings, settings.schema.json, settings.md), the RunPipeline keep-alive guard, template _BuildALGoProject wiring, release notes and Pester tests.

✅ Checklist

  • Add tests (E2E, unit tests)
  • Update RELEASENOTES.md
  • Update documentation (e.g. for new settings or scenarios)
  • Add telemetry

spetersenms and others added 2 commits August 6, 2026 16:32
Introduces a new opt-in RunTests action that moves normal test execution
(testFolders) out of the RunPipeline action. When useSeparateTestAction is
true, RunPipeline compiles, publishes and installs apps and keeps the build
container alive, but skips normal tests; the RunTests action then runs those
tests against the same container and produces TestResults.xml. BCPT and page
scripting tests are unchanged. Behavior is unchanged when the setting is false.

Includes the new setting (ReadSettings, settings.schema.json, settings.md),
the RunPipeline keep-alive guard, template _BuildALGoProject wiring, release
notes and Pester tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread Actions/RunTests/RunTests.ps1 Fixed
spetersenms and others added 6 commits August 7, 2026 10:04
The separate RunTests action now runs normal tests through Microsoft's
headless al runtests (AlTool) CLI by default instead of BcContainerHelper.
The runner resolves the kept-alive container's connection settings host-side
from the container name, installs the AL developer tools as a dotnet global
tool, runs the test codeunits batched (with an isolated fallback/rerun pass)
and emits the same TestResults.xml (JUnit) schema, so downstream test result
analysis is unchanged. No RunPipeline change is required.

BcContainerHelper remains available via a RunTestsInBcContainer override
script, which fully replaces the built-in AlTool runner (this is how, for
example, BCApps supplies its own runner and how Legacy test-type tests are
handled). The AlTool runner does not run Legacy test types or tests that
require UI/client-callback interaction; this is documented as a known
limitation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The official released al runtests tool does not support --testplan, so the
batch-first path in AlToolTestRunner hard-set �llPassed=false whenever the
batch failed to connect and never reset it, making every run falsely report
FAILED. Remove the batching path entirely and run each test codeunit in its
own �l runtests <codeunitId> --testmethods --raw invocation, with the
existing rerun-on-failure pass. �llPassed now derives solely from real
per-method outcomes via Add-JUnitTestSuite.

- Delete Invoke-AlBatchRunTests, ConvertFrom-AlBatchOutput,
  ConvertTo-AlTestPlanJson and their Export-ModuleMember entries.
- Update README and RELEASENOTES to per-codeunit wording.
- Drop the two batch-specific unit test contexts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants