Skip to main content

Notifications

Announcements

Run unit tests against external database

nmaenpaa Profile Picture nmaenpaa 101,146

Have you ever wanted to run your Dynamics 365 Finance / Supply Chain Management unit tests against some other database than the local one?

Microsoft has documented how you can point your dev system to another database, which is useful if you want to debug a copy of production data that has been exported in a Sandbox system. Instructions for this can be found here: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/database/dbmovement-scenario-debugdiag

But what if you would like to run unit tests against a different database? This could be useful especially in the build server.

If you try the process in the documentation, you will notice that it doesn't impact unit tests. To change that, you must update DynamicsDevConfig.xml in Visual Studio settings folder (for example C:\Users\Administrator\Documents\Visual Studio 2015\Settings). Locate tags <DatabaseServer> and <DatabaseName> and update them to match your requirements.

Comments

*This post is locked for comments