- Automated Testing in Microsoft Dynamics 365 Business Central
- Luc van Vugt
- 309字
- 2021-06-24 14:56:53
Categorization by FEATURE
By inspecting the names of the standard test codeunits, we got an impression of what kind of tests this collateral is made. Microsoft, however, has a better structured categorization, which so far, due to low priority, hasn't been explicitly shared with the outside world. Now that automated testing is being picked up more and more, it's pressing on Microsoft to put this on higher priority. But for now, we can access it already inside most of the test codeunits. You need to look for the FEATURE tag. This tag is part of the Acceptance Test-Driven Development (ATDD) test case design pattern, which we will be discussing later in Chapter 4, Test Design. Using the [FEATURE] tag, Microsoft categorizes their test codeunits and, in some cases, individual test functions. Note that this tagging is far from complete as not all test codeunits have it, yet.
Have a look at the (partial) abstract of the following codeunits:
- Codeunit 134000 - ERM Apply Sales/Receivables:
- OnRun:
- [FEATURE] [Sales]
- [Test] PROCEDURE VerifyAmountApplToExtDocNoWhenSetValue:
- [FEATURE] [Application] [Cash Receipt]
- [Test] PROCEDURE PmtJnlApplToInvWithNoDimDiscountAndDefDimErr:
- [FEATURE] [Dimension] [Payment Discount]
- OnRun:
- Codeunit 134012 - ERM Reminder Apply Unapply:
- OnRun:
- [FEATURE] [Reminder] [Sales]
- [Test] PROCEDURE CustomerLedgerEntryFactboxReminderPage:
- [FEATURE] [UI]
- OnRun:
In later chapters, we will look in more detail at various standard test functions. You will see how to take them as examples for your own test writing (Chapter 4, Test Design, Chapter 5, From Customer Wish to Test Automation - The Basics, Chapter 6, From Customer Wish to Test Automation - Next Level, and Chapter 7, From Customer Wish to Test Automation - And Some More), and how to get them to run on your own solution (Chapter 9, Getting Business Central Standard Tests Working on Your Code).
134000 to 139999: w1 tests
144000 to 149999: local tests