BizTalk Server: Unit Testing
Introduction
Out of the box Biztalk unit testing supports only schemas, maps and pipelines. Yet frameworks developed by community like BizUnit, BizMock and Bizmonade support also unit testing of orchestrations. With combination of out of box unit testing through Visual Studio and these frameworks a developer has the tools to test his BizTalk solution. This article will provide with references to the resources enabling you to be productive when it comes to unit testing your solution.
Unit Testing with Visual Studio
With Visual Studio 2008 the unit test functionality became available and supported unit testing with BizTalk Server 2009 projects. The unit testing feature enables developers to create unit tests for schemas, maps, and pipelines. The following resources will give you guidance on unit testing these artefacts with Visual Studio:
- BizTalk Server 2013: Unit Testing with BizTalk Server Projects
- BizTalk Server 2010: Unit Testing with BizTalk Server Projects
- BizTalk Server 2009: Unit Testing with BizTalk Server Projects
Unit testing with Frameworks BizUnit and BizMock
Other frameworks that can be used for unit testing are BizUnit, and BizMock that works seamlessly with Visual Studio unit testing capabilities. Both frameworks are not supported by Microsoft. They are available and supported through CodePlex. The following resource links can provide guidance on how to work with these frameworks:
- Introduction to BizMock
- Getting started with BizMock
- Using BizUnit for Automated Testing
- BizUnit 4.0 and BizTalk 2010
Other Frameworks
An alternative to BizUnit or BizMock is Bizmonade. This is a project that being developed to enable unit testing of BizTalk orchestrations, in isolation of other components, without deploying the orchestrations to BizTalk and without doing any configuration (bindings). Subsequently there is also a framework target on unit testing BizTalk Maps called BizTalk Map Test Framework. This framework enables developers to perform tests on their maps using template files and Xpath queries. Finally there is also Pipeline Test Library that enables you to test pipeline and pipeline components.
See Also
The following resources will provide useful information on unit testing BizTalk Server projects:
- Michael Stephenson posts on testing
- Enable Unit Testing in BizTalk 2009
- Excellence: A BizTalk Unit Testing Framework - An Overview
Another important place to find an extensive amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is BizTalk Server Resources on the TechNet Wiki.