Skip to content

[Draft] Add BCApps test worker timing markers - #14657

Open
Esteban (esardaya) wants to merge 1 commit into
mainfrom
private/esardaya/bcapps-test-worker-timings
Open

Esteban (esardaya) wants to merge 1 commit into
mainfrom
private/esardaya/bcapps-test-worker-timings

Conversation

@esardaya

@esardaya Esteban (esardaya) commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What & why

Add worker timing markers to logs when running tests to better understand where time is spent.

Linked work

Fixes #

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome (required — be specific: scenarios, commands, screenshots for UI changes)

Risk & compatibility

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@esardaya
Esteban (esardaya) requested a review from a team November 27, 2026 14:05
@github-actions github-actions Bot added Build: scripts & configs Build scripts and configuration files Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration labels Nov 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Could not find a linked work item. Please link one in either of these ways: (1) link an ADO work item using the pattern 'AB#' followed by the work item number - you may use the 'Fixes' keyword to automatically resolve it when the pull request is merged, e.g. 'Fixes AB#1234'; or (2) link a GitHub issue of type 'Task' using the pattern 'Fixes #' followed by the issue number, e.g. 'Fixes #1234'.

function Write-TestWorkerTiming {
param(
[hashtable]$Timing,
[string]$Event,
Describe 'BCApps test worker timing' {
BeforeAll {
$scripts = Split-Path $PSScriptRoot
$timingModule = Import-Module (Join-Path $scripts 'ParallelTestExecution.psm1') -PassThru -Force
$fixture = Join-Path (Convert-Path $TestDrive) 'worker'
New-Item -ItemType Directory -Path $fixture, (Join-Path $fixture 'TestTolerance') | Out-Null
$wrapperPath = Join-Path $fixture 'RunTestsInBcContainer.ps1'
Copy-Item (Join-Path $scripts 'RunTestsInBcContainer.ps1') $wrapperPath

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ Testing}$

The worker test copies RunTestsInBcContainer.ps1 into its isolated fixture but does not copy TestWorkerTiming.ps1. The fixture's stub ParallelTestExecution.psm1 therefore never defines Write-TestWorkerTiming in the background job, so the timing assertions exercise unresolved commands rather than the intended worker instrumentation. Add the timing script to the fixture or explicitly dot-source it from the copied wrapper before invoking the timing functions.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v10.0.7

This branch was successfully deployed

1 active deployment
triage — bbc043eb Deployed Nov 27, 2026 by esardaya via Classify team ownership #12300
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 Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants