SlideShare a Scribd company logo
Automated Testing for Dynamics CRM
Unit Testing
Custom Workflow Activities
Wael Hamze
Ramón Tébar
@CRMUG
Wael Hamze
▪ Solution Architect
▪ @WaelHamze
▪ http://www.linkedin.com/in/waelhamze
@CRMUG
Ramon Tebar
▪ Solution Architect
▪ Microsoft CRM MVP
▪ http://www.ramontebar.com
@CRMUG
Automated Testing Series
1. Unit Testing Plug-ins in Dynamics CRM 2013
2. Unit Testing Custom Workflow Activities in
Dynamics CRM 2013 [Tuesday, July 8]
3. Integration Testing Plug-Ins in Dynamics CRM
2013 [Tuesday, July 29]
4. Integration Testing Custom Workflow
Activities in Dynamics CRM 2013 [Wednesday,
August 27]
@CRMUG
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.
▪ Breaking limitations: Shims
▪ 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.
@CRMUG
CRM Workflow Runtime
CRM Workflow Runtime
Worflow
Worflow
Process
Custom
Workflow
Activity
• Sync. Worflows
• Async. Workflows
• Dialogs
• Actions
@CRMUG
Unit Test Mock<Extensions> Workflow Runtime
Create
Setup Mocks
Create + Inputs
Create + Inject Activity + Extensions
Execute
Workflow Activity
Invoke
Call
Verify
Outputs
@CRMUG
Demo
Our first test
@CRMUG
▪ It is definitely Possible
▪ It is definitely Helpful
▪ Too much effort using standard approach
Unit Testing Comments
@CRMUG
xRM Test Framework
@CRMUG
Demo
Now using
Xrm Test Framework
https://xrmtestframework.codeplex.com
@CRMUG
Demo
Data Driven Test
with an
External Service
Dependency
@CRMUG
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
@CRMUG
When to Run your Tests?
▪ Run your Tests locally before you Check-In
▪ Run your Tests as part of your Build
▪ Consider using Gated Check-In Builds
@CRMUG
Demo
Using your tests:
Continuous
Integration

More Related Content

PDF
Automated Testing for Dynamics CRM 4 - CRMUG 2014
PPTX
Automated Testing for Dynamics CRM 3 - CRMUG 2014
PDF
Automated Testing for Dynamics CRM 1 - CRMUG 2014
PDF
Continuous Integration for Dynamics 365/CRM
PDF
Continuous Delivery with Dynamics CRM - CRMUG Webinar 2014
PDF
Silverlight & Microsoft CRM Development - extremeCRM Berlin 2012
PDF
Continuous Delivery for Dynamics 365/CRM
PDF
Continuous Delivery with Dynamics CRM - extremeCRM 2014 Barcelona
Automated Testing for Dynamics CRM 4 - CRMUG 2014
Automated Testing for Dynamics CRM 3 - CRMUG 2014
Automated Testing for Dynamics CRM 1 - CRMUG 2014
Continuous Integration for Dynamics 365/CRM
Continuous Delivery with Dynamics CRM - CRMUG Webinar 2014
Silverlight & Microsoft CRM Development - extremeCRM Berlin 2012
Continuous Delivery for Dynamics 365/CRM
Continuous Delivery with Dynamics CRM - extremeCRM 2014 Barcelona

What's hot (20)

PDF
Testing CRM from a 360 View - extremeCRM Rome 2013
PDF
Test & Dynamics CRM - extremeCRM Berlin 2012
PPTX
Source Control and Release Strategy for Dynamics 365 Solutions
PDF
DevOps for Dynamics 365/CRM - Summit EMEA 2017 Amsterdam
PPTX
Ordina SOFTC Presentation - Deployment with TFS Build and Workflow
PPT
Team Foundation Server Demo
PPTX
CRM Saturday: DevOps with Jonas Rapp
PPTX
Optimizing deployment & dev ops with tfs 2013
PPTX
Continuous Integration In The Cloud Final (1)
PDF
One-Click Deployments - CRMUG London 2014
PDF
Useful Salesforce.com chrome extensions & Snapshots
PDF
Integration Testing in AEM
PDF
Tfs 2015 Upgrade Tips and Tricks
PPTX
Brisbane Salesforce User Group - May 2015 - Lightning Process Builder
PDF
Managing Your Batch and Scheduled Apex Processes with Relax
PPTX
Application Lifecycle Management with TFS
PDF
Release Management in TFS 2015
PPTX
CI with TFS
PPTX
What's new in Visual Studio 2013 & TFS 2013
PPTX
Streamline Workflows Using Salesforce Process builder
Testing CRM from a 360 View - extremeCRM Rome 2013
Test & Dynamics CRM - extremeCRM Berlin 2012
Source Control and Release Strategy for Dynamics 365 Solutions
DevOps for Dynamics 365/CRM - Summit EMEA 2017 Amsterdam
Ordina SOFTC Presentation - Deployment with TFS Build and Workflow
Team Foundation Server Demo
CRM Saturday: DevOps with Jonas Rapp
Optimizing deployment & dev ops with tfs 2013
Continuous Integration In The Cloud Final (1)
One-Click Deployments - CRMUG London 2014
Useful Salesforce.com chrome extensions & Snapshots
Integration Testing in AEM
Tfs 2015 Upgrade Tips and Tricks
Brisbane Salesforce User Group - May 2015 - Lightning Process Builder
Managing Your Batch and Scheduled Apex Processes with Relax
Application Lifecycle Management with TFS
Release Management in TFS 2015
CI with TFS
What's new in Visual Studio 2013 & TFS 2013
Streamline Workflows Using Salesforce Process builder
Ad

Similar to Automated Testing for Dynamics CRM 2 - CRMUG 2014 (20)

PDF
Automation in Scrum Testing: Speed Without Sacrificing Quality
PPTX
A comparative study of process templates in team
PDF
Agile ALM Virtual Study Group Session 1 - Scrum process
PDF
Management Issues in Test Automation
PDF
Experience Enhanced Testing with the Best Test Automation Tools for Salesforc...
PDF
Experience Enhanced Testing with the Best Test Automation Tools for Salesforc...
PDF
Pega Robotics Training @Phno: whatsapp @8142976573.
PDF
Pega robotics best practices building solutions (1)
PPTX
What is Scrum
PPTX
Seminar on Scrum
PPTX
Seminar On Scrum
PPTX
How To Transform the Manual Testing Process to Incorporate Test Automation
PPTX
BPM for business analysts: modelling procedure
PDF
IBM Agile ALM Overview
PDF
Management Issues in Test Automation
PDF
Why Automation Fails—in Theory and Practice
PDF
3 Approaches for Integrated ALM - A Case for ALM Platform - Whitepaper
PDF
System-Level Test Automation: Ensuring a Good Start
PDF
Management Issues in Test Automation
PPT
Michael Snyman - Software Test Automation Success
Automation in Scrum Testing: Speed Without Sacrificing Quality
A comparative study of process templates in team
Agile ALM Virtual Study Group Session 1 - Scrum process
Management Issues in Test Automation
Experience Enhanced Testing with the Best Test Automation Tools for Salesforc...
Experience Enhanced Testing with the Best Test Automation Tools for Salesforc...
Pega Robotics Training @Phno: whatsapp @8142976573.
Pega robotics best practices building solutions (1)
What is Scrum
Seminar on Scrum
Seminar On Scrum
How To Transform the Manual Testing Process to Incorporate Test Automation
BPM for business analysts: modelling procedure
IBM Agile ALM Overview
Management Issues in Test Automation
Why Automation Fails—in Theory and Practice
3 Approaches for Integrated ALM - A Case for ALM Platform - Whitepaper
System-Level Test Automation: Ensuring a Good Start
Management Issues in Test Automation
Michael Snyman - Software Test Automation Success
Ad

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
Teaching material agriculture food technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Spectroscopy.pptx food analysis technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
MYSQL Presentation for SQL database connectivity
Chapter 3 Spatial Domain Image Processing.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Teaching material agriculture food technology
Encapsulation_ Review paper, used for researhc scholars
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Spectral efficient network and resource selection model in 5G networks
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Empathic Computing: Creating Shared Understanding
Spectroscopy.pptx food analysis technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
sap open course for s4hana steps from ECC to s4
MYSQL Presentation for SQL database connectivity

Automated Testing for Dynamics CRM 2 - CRMUG 2014

  • 1. Automated Testing for Dynamics CRM Unit Testing Custom Workflow Activities Wael Hamze Ramón Tébar
  • 2. @CRMUG Wael Hamze ▪ Solution Architect ▪ @WaelHamze ▪ http://www.linkedin.com/in/waelhamze
  • 3. @CRMUG Ramon Tebar ▪ Solution Architect ▪ Microsoft CRM MVP ▪ http://www.ramontebar.com
  • 4. @CRMUG Automated Testing Series 1. Unit Testing Plug-ins in Dynamics CRM 2013 2. Unit Testing Custom Workflow Activities in Dynamics CRM 2013 [Tuesday, July 8] 3. Integration Testing Plug-Ins in Dynamics CRM 2013 [Tuesday, July 29] 4. Integration Testing Custom Workflow Activities in Dynamics CRM 2013 [Wednesday, August 27]
  • 5. @CRMUG 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. ▪ Breaking limitations: Shims ▪ 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.
  • 6. @CRMUG CRM Workflow Runtime CRM Workflow Runtime Worflow Worflow Process Custom Workflow Activity • Sync. Worflows • Async. Workflows • Dialogs • Actions
  • 7. @CRMUG Unit Test Mock<Extensions> Workflow Runtime Create Setup Mocks Create + Inputs Create + Inject Activity + Extensions Execute Workflow Activity Invoke Call Verify Outputs
  • 9. @CRMUG ▪ It is definitely Possible ▪ It is definitely Helpful ▪ Too much effort using standard approach Unit Testing Comments
  • 11. @CRMUG Demo Now using Xrm Test Framework https://xrmtestframework.codeplex.com
  • 12. @CRMUG Demo Data Driven Test with an External Service Dependency
  • 13. @CRMUG 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
  • 14. @CRMUG When to Run your Tests? ▪ Run your Tests locally before you Check-In ▪ Run your Tests as part of your Build ▪ Consider using Gated Check-In Builds