Test example 8 – how to test a report
Reports have always been a substantial part of many Business Central projects and solutions. It makes perfect sense to have a look at how to test them in an automated manner. But how do you go about doing that? In this example, you will learn how to test the dataset being created by a report by inspecting its XML structure. Layout testing is another job to do, and, unfortunately, one outside of the testability framework.
Customer wish
Your customer's wish describes that the Lookup Value Code
field of the customer must be carried over to the various sales documents. The logical consequence, even though not explicitly stated, would be that each printed version of these documents would have to be extended with this field. As sales document reports are quite comprehensive, both on the dataset and on the layout side, we take a simpler example.
We'll clone report 101, Customer - List
, and add the Lookup Value Code
field to...