Surface empty BCPT results as a warning instead of silent success (#2229)
## Problem When BCPT performance tests run but produce no log entries (for example, because the test runner exits early, the suite codeunit IDs do not match the published app, or the job fails silently), the results file contains no entries. \GetBcptSummaryMD\ returned an empty string, the \AnalyzeTests\ step wrote nothing to the job summary, and the build succeeded with no indication that performance tests did not produce output. Fixes #2158 ## Changes ### Actions/AnalyzeTests/TestResultAnalyzer.ps1 - \GetBcptSummaryMD\: Distinguish between the results file not existing (return empty string, no test was run) and the results file existing but containing no entries (return an informational message). The message is written to the GitHub step summary under the Performance test results heading, making the empty result visible. ### Actions/AnalyzeTests/AnalyzeTests.ps1 - After calling \GetBcptSummaryMD\, check whether the results file is present but the summary is still empty. Emit a \::Warning::\ annotation in that case as a defence-in-depth measure. ### Tests/AnalyzeTests.Test.ps1 - Add tests for \ReadBcptFile\ when the file does not exist and when it exists but contains no entries. - Add a test for \GetBcptSummaryMD\ verifying that it returns an empty string when the file does not exist and a non-empty warning message when the file exists but contains no entries. ## Testing 1. Create a BCPT test app and configure a suite with codeunit IDs that do not match any published app. 2. Run the AL-Go pipeline so that \RunBCPTTests.ps1\ exits without recording measurements. 3. Before this fix: the Performance test results step writes nothing to the summary and the build succeeds silently. 4. After this fix: the summary shows a message stating that no BCPT results were recorded, and a warning annotation appears on the step. You can also run the Pester test suite locally: \\\powershell Invoke-Pester Tests/AnalyzeTests.Test.ps1 \\\ All 10 tests should pass. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>
J
Jeffrey Bulanadi committed
4f5f9c18698cb8791ebb77b5b5514a4fdd82b51b
Parent: 5b41f44
Committed by GitHub <noreply@github.com>
on 7/22/2026, 10:10:46 AM