mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-09 02:41:37 +01:00
Add new action skills for AL testing and documentation
- Introduced `al-test-writer` to generate AL test codeunits for production objects based on TDD principles. - Added `al-userguide-test-writer` to create test codeunits from user guide steps, mapping actions and assertions. - Implemented `bc-extension-test-guide` to generate a comprehensive TEST_GUIDE.md for Business Central extensions, covering various categories. - Created `bc-webclient-runner` to automate UI testing of the Business Central web client, capturing screenshots and asserting UI states. - Developed `page-scripting-e2e` to produce a recording plan for Page Scripting, ensuring a structured approach to browser-level testing.
This commit is contained in:
parent
822cae1b27
commit
07140e2223
76 changed files with 4353 additions and 6 deletions
|
|
@ -0,0 +1,32 @@
|
|||
// Anti-pattern: a new id minted at a downstream hop, and an outbound call with no correlation
|
||||
// header. Nothing ties the inbound message, this processing step, and the external system's
|
||||
// logs together. Tracing a failure becomes correlation-by-timestamp guesswork.
|
||||
|
||||
codeunit 50192 "Outbound Step Bad"
|
||||
{
|
||||
procedure Send(var IntegrationMessage: Record "Integration Message")
|
||||
var
|
||||
Client: HttpClient;
|
||||
Request: HttpRequestMessage;
|
||||
Headers: HttpHeaders;
|
||||
Response: HttpResponseMessage;
|
||||
LocalTrace: Guid;
|
||||
begin
|
||||
// BAD: a brand-new id, unrelated to IntegrationMessage."Correlation ID". The entry point
|
||||
// already minted the flow's trace id; minting another one here breaks the chain just as
|
||||
// thoroughly as having none, because the two halves now log different identifiers.
|
||||
LocalTrace := CreateGuid();
|
||||
|
||||
// This trace value appears in no other component's logs, so it joins to nothing.
|
||||
LogStep('sending', Format(LocalTrace));
|
||||
|
||||
Request.SetRequestUri('https://svc.contoso.com/api/orders');
|
||||
Request.Method := 'POST';
|
||||
Request.GetHeaders(Headers);
|
||||
|
||||
// BAD: no Correlation-Id header at all. The receiver logs the call under its own ids, and
|
||||
// there is no shared value to join the external system's logs back to this flow. When this
|
||||
// POST fails three hops into a busy system, reconstructing what happened is archaeology.
|
||||
Client.Send(Request, Response);
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue