Skip to content

Split Tests-SCM: extract Tests-SCM-Warehouse to parallelize the test run#9680

Open
Groenbech96 wants to merge 4 commits into
microsoft:mainfrom
Groenbech96:copilot/split-tests-scm-warehouse
Open

Split Tests-SCM: extract Tests-SCM-Warehouse to parallelize the test run#9680
Groenbech96 wants to merge 4 commits into
microsoft:mainfrom
Groenbech96:copilot/split-tests-scm-warehouse

Conversation

@Groenbech96

Copy link
Copy Markdown
Contributor

Why

Tests-SCM is a single test app with ~8.6k tests (~113 min run time) and is the long pole of the BCApps test run. build/scripts/ParallelTestExecution.psm1 dispatches each test app as its own parallel job on a separate tenant, so tests inside one app run serially — a single giant app cannot be parallelized and bounds the critical path.

The SCM domain was already partially carved up (Tests-SCM-Assembly, Tests-SCM-Manufacturing, Tests-SCM-Service). This PR continues that pattern by extracting the Warehouse / WMS sub-domain.

What

Extracts 39 test codeunits (~2,187 tests) from Tests-SCM into a new Tests-SCM-Warehouse app so it runs concurrently with the Tests-SCM remainder.

  • New app src/Layers/W1/Tests/SCM-Warehouse/app.json (new id, dependencies copied from Tests-SCM) + the 39 moved codeunits (moved with git mv, history preserved).
  • build/projects.json — new Tests-SCM-Warehouse project block (mirrors Tests-SCM-Service).
  • build/groups.json — new entry (Base / Financials / OnPrem).
  • build/scripts/TestConfiguration.json — added to LegacyTests-Bucket2, next to its parent Tests-SCM.
  • All 23 build/projects/Apps <country>/.AL-Go/settings.json — folder added to testFolders.
  • Disabled tests — 362 matching entries moved into src/DisabledTests/Tests-SCM-Warehouse/ and pruned from the two Tests-SCM disabled-test files.

Safety / validation

  • Zero code coupling between the two apps — verified 0 cross-references among the split codeunits, so both compile independently with no new inter-app dependency.
  • Object IDs unchanged (133504–139506 range stays globally unique) → no renumbering.
  • Helper libraries are external (Tests-TestLibraries, System Application Test Library, …) → shared automatically.
  • All touched JSON parses; disabled-test entries conserved exactly (674 + 468 + 362 = 1,504); no warehouse-id leaks into the pruned files.

Impact

Tests-SCM is split into two apps that run concurrently on separate tenants, so the SCM critical path drops toward the larger half instead of the sum.

Notes

  • This is a proof-of-concept for one sub-domain. The remainder can be split further (Inventory, Planning, ItemTracking+Reservation, Costing) the same way.
  • Which legacy bucket each split lands in (Bucket1 vs Bucket2) is a load-balancing lever best tuned against measured per-app runtime — test count is only a rough proxy (costing/warehouse tests are the heaviest per test).

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Tests-SCM is a single test app (~8.6k tests, ~113 min) and the long pole
in the BCApps test run, since ParallelTestExecution dispatches each test
app as its own parallel job on a separate tenant. This carves the
Warehouse/WMS sub-domain (39 codeunits, ~2187 tests) into a new
Tests-SCM-Warehouse app so it runs concurrently with the Tests-SCM
remainder, shortening the critical path.

- New app src/Layers/W1/Tests/SCM-Warehouse (app.json + 39 moved codeunits)
- Register in build/projects.json, build/groups.json and
  TestConfiguration.json (LegacyTests-Bucket2, next to Tests-SCM)
- Add the folder to testFolders in all 23 Apps <country> AL-Go settings
- Move 362 matching disabled-test entries into
  DisabledTests/Tests-SCM-Warehouse and prune them from the Tests-SCM files

No code coupling between the two apps (0 cross-references verified); object
IDs are unchanged and remain globally unique, so no renumbering is needed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Groenbech96
Groenbech96 requested review from a team July 23, 2026 07:59
@Groenbech96
Groenbech96 requested a review from a team as a code owner July 23, 2026 07:59
@github-actions github-actions Bot added Build: scripts & configs Build scripts and configuration files From Fork Pull request is coming from a fork labels Jul 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link.

@github-actions github-actions Bot added Other GitHub request for other area than SCM, Finance or Integration Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction labels Jul 23, 2026
Magnus Hartvig Grønbech and others added 3 commits July 23, 2026 13:12
Adds Tests-SCM-Warehouse to Base Application internalsVisibleTo, resolving AL0161 failures in the country builds.

[bcapps-fix-loop attempt 1]

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 093dac30-6dd7-42da-9378-2e096ccc6fd5
The Tests-SCM split moved warehouse test codeunits from
Layers/W1/Tests/SCM to Layers/W1/Tests/SCM-Warehouse, but left the
country-layer localization overrides in Layers/<CC>/Tests/SCM. Because
country layers overlay onto the W1 app by folder name, those overrides
kept shipping in Tests-SCM while their W1 base now ships in
Tests-SCM-Warehouse, causing duplicate object errors at install time
(e.g. codeunit 137048 'SCM Warehouse II' in NZ).

Move the 11 stray overrides (CH, CZ, GB, NA, NO, NZ, RU) into a
Tests/SCM-Warehouse folder in each country layer, matching the base
relocation and the existing SCM-Assembly/Service overlay pattern.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8ae9b321-45bb-411e-9b9d-e8cde28c467e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build: scripts & configs Build scripts and configuration files From Fork Pull request is coming from a fork Other GitHub request for other area than SCM, Finance or Integration Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant