Book Image

.Automated Testing in Microsoft Dynamics 365 Business Central

By : Luc van Vugt
Book Image

.Automated Testing in Microsoft Dynamics 365 Business Central

By: Luc van Vugt

Overview of this book

Dynamics 365 Business Central is the new cloud-based SaaS ERP proposition from Microsoft. It’s not as simple as it used to be way back when it was called Navigator, Navision Financials, or Microsoft Business Solutions-Navision. Our development practices are becoming more formal, and with this, the call for test automation is pressing on us. This book will teach you to leverage testing tools available with Dynamics 365 Business Central to perform automated testing. We’ll begin with a quick introduction to automated testing, followed by an overview of test automation in Dynamics 365 Business Central. Then you’ll learn to design and build automated tests and we’ll go through some efficient methods to get from requirements to application and testing code. Lastly, you’ll learn to incorporate your own and Microsoft tests into your daily development practice. By the end of the book, you’ll be able to write your own automated tests for Dynamics 365 Business Central.
Table of Contents (17 chapters)
Free Chapter
Section 1: Automated Testing - A General Overview
Section 2: Automated Testing in Microsoft Dynamics 365 Business Central
Section 3: Designing and Building Automated Tests for Microsoft Dynamics 365 Business Central
Section 4: Integrating Automated Tests in Your Daily Development Practice

It's all about data

In my experience, getting the standard tests working on your code is mainly about getting the test fixture right. As in the previous exercise, fixing the first error on our list isn't a coincident. It's a plain example of what you will be doing in getting the standard tests run on your code: bring the test fixture in the right state. In this specific case, we fixed the fresh fixture. Solving the remaining errors is again about updating the test fixture. In those cases, it concerns the shared fixture.

Looking closer at the remaining failing tests, it seems that our first error did not completely vanish. Saving you the trouble of going through all of them, I have picked out the following three failing tests:

Apparently, our generic fix for the CreateCustomer helper method did not have any effect on these. Debugging each of them shows eventually...