Automated Testing for Dynamics CRM Wael Hamze Ramon Tebar Automated Testing for Dynamics CRM Unit Testing Plug-Ins
Wael Hamze Solution Architect working for the CRM Centre of Excellence at Barclays in London Specializes in Dynamics CRM, Application Lifecycle Management & Microsoft Technology Stack @WaelHamze http://www.linkedin.com/in/waelhamze http://www.waelhamze.com
Ramon Tebar Solution Architect working for Metro Bank in London Design & Development of Dynamics CRM Solutions and related technologies Over 5 Years Experience with Dynamics CRM (3.0 - 2013) & Microsoft Technology Stack Microsoft CRM MVP http://www.ramontebar.com
Automated Testing Series Unit Testing Plug-ins in Dynamics CRM 2013 Unit Testing Custom Workflow Activities in Dynamics CRM 2013 [Wednesday, July 8] Integration Testing Plug-Ins in Dynamics CRM 2013 [Tuesday, July 29] Integration Testing Custom Workflow Activities in Dynamics CRM 2013 [Wednesday, August 27]
Automated Testing Series Unit Testing Plug-ins in Dynamics CRM 2013 This session will provide you with an Introduction to Unit Testing concepts and best practices. You will learn how to apply this to fake the Dynamics CRM plug-in runtime to unit test Dynamics CRM plug-ins using Microsoft Fakes. This session will also introduce you to the xRM Test Framework and show how you can speed up the creation of your tests.
Unit Testing Mock 1 Mock 2 Component Unit Tests Dependency 1
Write Testable Code: Dependency Injection Plugin CRM Service Provider Uses CRM Platform CRM Service Provider Creates Creates Implements Plugin IServiceProvider Uses
Microsoft Fakes Framework for isolating code under test released with .NET 4.5 Create Mock object implementations for the required interfaces (Stub) and classes (Shim) Mock any properties and methods by creating standard .NET delegates Invoke the Mocked properties and methods as part of your Unit Test
How to use Microsoft Fakes Demo How to use Microsoft Fakes
Plug-In Testing Sequence Unit Test StubIServiceProvider Plugin Create Setup Mocks Create Execute Call Verify / Assert
How to test a plugin using Microsoft Fakes Demo How to test a plugin using Microsoft Fakes
Unit Testing Comments It is definitely Possible It is definitely Helpful Too much effort using standard approach
xRM Test Framework
How to test a plugin using xRM Test Framework Demo How to test a plugin using xRM Test Framework https://xrmtestframework.codeplex.com
Why Write Unit Tests? Validate all components work on their own Ability to Test Plug-ins & Custom Workflow Activities without CRM Environment Ability to Test without Deployment Tests run much quicker Detect bugs very early and fix quickly Debug locally with Visual Studio
Thank YOU for attending! Wael Hamze contact@waelhamze.com Ramon Tebar contact@ramontebar.com Thank YOU for attending! Unit Testing Plug-ins in Dynamics CRM 2013 Unit Testing Custom Workflow Activities in Dynamics CRM 2013 [Next! - Wednesday, July 8] Integration Testing Plug-Ins in Dynamics CRM 2013 [Tuesday, July 29] Integration Testing Customer Workflow Activities in Dynamics CRM 2013 [Wednesday, August 27]
Automated Testing Series 2. Unit Testing Custom Workflow Activities in Dynamics CRM 2013 This session will focus on using the Unit Testing concepts from the previous session and show you how you can apply that to test custom workflow activities using Moq. This session will also introduce you to the xRM Test Framework and show you how you can speed up the creation of your tests. Finally you will see how you can execute these unit tests as part of your builds.