For the past few months, I have been developing a new unit testing framework for BizTalk. This framework is specialized on unit testing Orchestrations, and unlike existing tools, it allows testing orchestrations without first deploying into BizTalk and without doing any configuration (bindings). The project is now complete enough to release a “preview” version. It still lacks important features, but it is a working implementation and I would be very interested in hearing feedback from the BizTalk community.
Tests can be written in C# using NUnit, MSTest or any other .Net testing framework.
Example test written using this tool:
public void TotalForOrder413ShouldBe14_99()
// Ensure the orchestration publishes an updated "PurchaseOrder" with the correct price quote
// NUnit asserts, if using another framework, substitute with that framework's syntax
// Simulate that the client sent an "Approved Purchase Order" in response
// to the price quote.
// Ensure the orchestration publishes the right Invoice in reaction to the approval
// Not using NUnit asserts this time, can be used with any test framework,
// but provides less deatailed errors in case of failure (for now)
msg.GetDistinguishedField<string>("Number") == "1") &&
msg.GetDistinguishedField<decimal>("TotalPrice") == 14.99m
// Ensure the orchestration completes successfully
The tool does not depend on BizTalk’s orchestration engine, instead it provides its own implementation of the XLang/s language. It generates C# code from ODX files (using an interpreter generated with SableCC), and the generated C# code uses Bizmonade’s “fake orchestration engine” implementation. This allowed developing the tool without worrying about internal BizTalk implementation details.
More details and download on bizmonade.matricis.com.