XrmMockup

XrmMockup: An out-of-the-box Dynamics 365 testing framework

XrmMockup is a tool for mocking your own MS Dynamics CRM instance. Instead of testing against specific parts of your code, thus requiring you to define how behavior is mocked, XrmMockup acts like a complete CRM system, which you send commands to. This enables you to test and debug the functionality of your CRM system, with all your plugins and workflows automatically running inside your test.

Get it now!

Why use XrmMockup?


XrmMockup makes it easy to test your business logic. XrmMockup provides you with an IOrganizationServie that you can use, just like you would use it with a real CRM instance!

Just like the real CRM instance it will execute your business logic, but XrmMockup does this locally.

In the following example, the orgAdminService is provided by XrmMockup, the rest is your code. This example uses the typings generated by XrmContext


[TestMethod]
public void TestCreateSimple() {
    var contact = new Contact() {
        FirstName = "John"
    };
    contact.Id = orgAdminService.Create(contact);

    var dbContact = Contact.Retrieve(orgAdminService, contact.Id);
    Assert.AreEqual(contact.FirstName, dbContact.FirstName);
    Assert.AreEqual("NoLastName", dbContact.LastName);
}
              

XrmMockup executes your code! This means your plugin code is executed directly, such that you can set breakpoints and debug your businesslogic

XrmMockup fetches your customizations and business process' directly from your CRM instance. Thus you can test your workflows and actions as well!

Get started testing your code!

Test your code

Install from NuGet

There is a version of XrmMockup for each major version of Dynamics CRM, where the name is XrmMockup followed by the version, such as "XrmMockup2016". Install the one that matches your instance.
View all releases on NuGet.