Testing BizTalk Custom Pipeline

There are a few ways to test BizTalk Custom Pipelines out there. If you want automatically execute pipeline on input and verify it’s not exploding, you can leverage TestableSendPipeline coming along with BT projects.

A few things that are required for this to work:

1. Enable unit testing on the BT project

000

2. Include PipelineObjects.dll assembly found at %programfiles%\Microsoft BizTalk Server 2009\SDK\Utilities\PipelineTools into your project and reference it from your test project along with other BT assemblies.

001

3. Create your spec (test) that would exercise the pipeline.

002 Note: the funky path thing is because is for loading input file properly when test is executed with TestDriven.NET in Visual Studio .NET, as well as when executed by Gallio as a part of automated build script. File has to be copied to the output for this to work.

003

As a result – pipeline is testable and any change to an input sample document will re-kick testing that will fail if something is not addressed they way it was designed before the change took place.

004

 

Now, if only I could figure out how in the world to get hold of the output…

No Comments