mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-08 18:31:36 +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,27 @@
|
|||
// Anti-pattern: no framing record, no watermark, no lock. Every run fetches the whole
|
||||
// collection, and two overlapping Job Queue runs stage the same records twice.
|
||||
|
||||
codeunit 50132 "Inbound Poller Bad"
|
||||
{
|
||||
TableNo = "Job Queue Entry";
|
||||
|
||||
procedure Poll()
|
||||
var
|
||||
Client: HttpClient;
|
||||
Response: HttpResponseMessage;
|
||||
begin
|
||||
// BAD: "fetch all". No last-fetch datetime feeds the request and no window cap bounds it,
|
||||
// so the cost of every poll grows with the TOTAL data set, not with what is new. Records
|
||||
// that were already staged and resolved are pulled again and reprocessed every run.
|
||||
Client.Get('https://svc.contoso.com/api/orders', Response);
|
||||
|
||||
// BAD: no lock. The Job Queue can start the next run before this one finishes (a run that
|
||||
// overruns its recurrence interval overlaps the following one). Both runs fetch the full
|
||||
// collection concurrently and BOTH stage every order, so each order lands twice and becomes
|
||||
// a duplicate document downstream.
|
||||
StageAll(Response);
|
||||
|
||||
// There is also no watermark to advance, so even back-to-back runs cannot narrow their
|
||||
// windows: there is no notion of "where we left off" anywhere in this design.
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue