Standard libraries
Goal: Get to know the basics about the standard test helper libraries provided by Microsoft.
Supporting their Base Application tests, Microsoft has created a nice and very useful collection of helper functions in approx. 100 library codeunits. These helper functions are gathered in the Test-TestLibraries test app and range from random data and master data generation to standard generic and more specific check routines.
Need a new item? You might make use of the CreateItem
or CreateItemWithoutVAT
helper functions in Library - Inventory
(codeunit 132201).
Need some random text? Use the AlphabeticText
helper function in Any
(codeunit 130500).
Want to get the same formatted error messages when verifying your test outcome? Use one of the helper functions in the Library Assert
(codeunit 130002), such as IsTrue
, AreNotEqual
, and ExpectedError
.
Note
When referencing their helper functions in the standard libraries from your extension, you will need to define...