Dynamics CRM 2011 Unit Test Part 1: Introduction and Series Contents

Introduction

This is the first post of a series containing collections of patterns and code fragments showing how various unit frameworks can be used in Dynamics CRM 2011 development.

Unit test with server side components, (web service, plugin, workflow), will be explained with Microsoft Fakes, Rhino Mocks and Moq.

Unit test with client side JavaScript will be explained with QUnit.

The complete sample code using Microsoft Fakes can be downloaded from MSDN sample gallery: Dynamics CRM unit test using Microsoft Fakes

Series Contents

Part 1: Introduction and Series Contents

  • Introduces the topics that will be covered in the series

Part 2: Microsoft Fakes with LINQ query

  • Unit test CRM LINQ query
  • Mock System.Linq namespace
  • Mock Mock OrganizationServiceContext.CreateQuery
  • Mock OrganizationServiceContext
  • Create SaveChangesResultCollection
  • Create SaveChangesResult

Part 4: Microsoft Fakes with CrmOrganizationServiceContext

  • Mock CrmOrganizationServiceContext

Part 5: Microsoft Fakes with LINQ query through IOrganizationService

  • Mock IOrganizationService to isolate LINQ to CRM query

Part 6: Microsoft Fakes with OrganizationServiceContext through IOrganizationService

  • Isolate method call to OrganizationServiceContext through mocking IOrganizationService

Part 7: Microsoft Fakes with CrmOrganizationServiceContext through IOrganizationService

  • Isolate method call to OrganizationServiceContext extension methods through mocking IOrganizationService
  • Isolate method call to CrmOrganizationServiceContext through mocking IOrganizationService

Part 8: Microsoft Fakes with IOrganizationService

  • Using Stub type to isolate method call to IOrganizationService

Part 9: Microsoft Fakes with CRM plugin

  •  Mock IOrganizationService, IPluginExecutionContext, ITracingService, IOrganizationServiceFactory and IServiceProvider

Part 10: Microsoft Fakes with workflow activity

  • Correctly invoke CodeActivity.Execute(CodeActivityContext executionContext)
  • Correctly pass in InArgument<T> properties
  • Pass in required service as extensions

Part 11: QUnit with client side JavaScript

  • QUnit
  • Xrm.Page Script Library Template (Microsoft Visual Studio extension)

Part 12: Rhino Mocks with LINQ query, OrganizationServiceContext and CrmOrganizationServiceContext

Part 13: Rhino Mocks with IOrganizationService

Part 14: Rhino Mocks with CRM plugin

Part 15: Rhino Mocks with workflow activity

Part 16: Moq with LINQ query, OrganizationServiceContext and CrmOrganizationServiceContext

Part 17: Moq with IOrganizationService

Part 18: Moq with CRM plugin

Part 19: Moq with workflow activity

About these ads

18 comments on “Dynamics CRM 2011 Unit Test Part 1: Introduction and Series Contents

  1. Pingback: Dynamics CRM 2011 Unit Test Part 1: Introduction and Series Contents - Zhongchen Zhou's Dynamics CRM Tips, Tricks and Portal Development - CRM Technical Blogs - Microsoft Dynamics Community

  2. Pingback: Dynamics CRM 2011 Unit Test Part 2: Microsoft Fakes with LINQ query | Zhongchen Zhou's Blog

  3. Pingback: Dynamics CRM 2011 Unit Test Part 3: Microsoft Fakes with OrganizationServiceContext | Zhongchen Zhou's Blog

  4. Pingback: Dynamics CRM 2011 Unit Test Part 4: Microsoft Fakes with CrmOrganizationServiceContext | Zhongchen Zhou's Blog

  5. Pingback: Dynamics CRM 2011 Unit Test Part 5: Microsoft Fakes with LINQ query through IOrganizationService | Zhongchen Zhou's Blog

  6. Pingback: Part 6: Microsoft Fakes with OrganizationServiceContext through IOrganizationService | Zhongchen Zhou's Blog

  7. Pingback: Dynamics CRM 2011 Unit Test Part 7: Microsoft Fakes with CrmOrganizationServiceContext through IOrganizationService | Zhongchen Zhou's Blog

  8. Pingback: Dynamics CRM 2011 Unit Test Part 8: Microsoft Fakes with IOrganizationService | Zhongchen Zhou's Blog

  9. Pingback: Dynamics CRM 2011 Unit Test Part 9: Microsoft Fakes with CRM plugin | Zhongchen Zhou's Blog

  10. Pingback: Dynamics CRM 2011 Unit Test Part 10: Microsoft Fakes with workflow activity | Zhongchen Zhou's Blog

  11. Pingback: Dynamics CRM 2011 Unit Test Part 10: Microsoft Fakes with workflow activity - Zhongchen Zhou's Dynamics CRM Tips, Tricks and Portal Development - CRM Technical Blogs - Microsoft Dynamics Community

  12. Pingback: How I develop and unit test CRM 2011 plugins - Gold Coast - Site Home - MSDN Blogs

  13. Pingback: Dynamics CRM 2011 Unit Test Part 11: QUnit with client side JavaScript | Zhongchen Zhou's Blog

  14. Pingback: Dynamics CRM 2011 Unit Test Part 11: QUnit with client side JavaScript - Zhongchen Zhou's Dynamics CRM Tips, Tricks and Portal Development - CRM Technical Blogs - Microsoft Dynamics Community

  15. Pingback: Dynamics CRM 2011 Unit Test Part 14: Rhino Mocks with CRM plugin | Zhongchen Zhou's Blog

  16. Pingback: Dynamics CRM 2011 Unit Test Part 14: Rhino Mocks with CRM plugin - Zhongchen Zhou's Dynamics CRM Tips, Tricks and Portal Development - CRM Technical Blogs - Microsoft Dynamics Community

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s