Geeks With Blogs

News View Michael Stephenson's profile on BizTalk Blog Doc View Michael Stephenson's profile on LinkedIn
Michael Stephenson keeping your feet on premise while your heads in the cloud

I have been wanting to include the BizTalk orchestration profiler into our build process for a while and have eventually got around to doing it.

Like some of the other recent posts ive produced a simple example demonstrating this.  I will begin by discussing the example on how to use the task and then follow this with some comments on the task itself.

Using the BizTalk Orchestration Profiler MsBuild Task

The idea of the BizTalk Orchestration Profiler Task is that when my build script has ran the BizUnit tests for my BizTalk solution I want to run the Profiler to extract a report giving details of the code coverage within my orchestrations.

The orchestration profiler can be ran from the command line but im not sure that you can specify more specifically which orchestrations you are interested in like you could from the Forms interface.  In addition to this it integrates nicely into my build script if I wrap the Profiler inside a custom MsBuild task.

To use the task I need to know the date and time for the start date of the report.  This is important to ensure I dont pick up coverage information from previous test runs.

The following demonstrates my sample build script:


 At the start of my build script I call the GetDate task to get the date and time when the build starts.  These are saved in parameters for use later in the script.  In the middle of the script I have a message which is where the calling of the BizUnit tests would be.

After the tests are finished I call the Orchestration Profiler task.  In the example case I am running the report for the BizTalk.System application.  This will profile all orchestrations within this application.

When the task has ran it will create the report in the place indicated by the output path and the report title.  In the above example the report produced will be placed at the following path C:\BizTalk.System Coverage Report.chm

The DelayMinites attribute allows you to specify a pause before running the report to ensure all of the tracking data will be transferred to the tracking database.

Implementing the BizTalk Orchestration Profiler MsBuild Task

In implementing the task I have basically called the Microsoft.Sdc.OrchestrationProfiler.Core assembly in the same way that the Orchestration Profiler interface does.  In addition to this I have some code which uses the Microsoft.Sdc.BizTalkOM assembly to get a list of the orchestrations belonging to the application which has been supplied.

The other key point is that the profiler has a dependancy on a key in its config file indicating the path to the html help workshop.  This was going to cause a problem running this as an MsBuild task as the config setting would need to be in the MsBuild.exe.config file. 

To get around this I have a method that will check for the setting and if its not there it will write the setting to the config file and refresh the section using the System.Configuration assembly.

There are really the highlights of the implementation, but please refer to the sample below which contains all of the code.


I have noticed a few sites that seem to copy the content of blog articles and display them in their own site.  It is a bit annoying that they do not clearly reference or acknowledge the author so I have decided to put this note on the bottom of all of my posts from now so it is clear who wrote it.

This article was written by: Michael Stephenson

The source of this article is:

Posted on Tuesday, January 29, 2008 9:22 PM BizTalk , MsBuild , BizTalk Testing | Back to top

Comments on this post: Integrating the BizTalk Orchestration Profiler into your MsBuild Process

# Sample Code
Requesting Gravatar...
Where is the sample code?

Left by Matthew Foos on Nov 04, 2008 3:25 PM

# re: Integrating the BizTalk Orchestration Profiler into your MsBuild Process
Requesting Gravatar...
It is blocked. If you couple email it that would great. Thanks for the quick reply.

Also, when I try to run the profiler from the UI I see object reference not set error... Any ideas?

Thanks again Mike,
Left by Matthew Foos on Nov 13, 2008 7:58 PM

# re: Integrating the BizTalk Orchestration Profiler into your MsBuild Process
Requesting Gravatar...
necessary education related بازی آشپزی BizTalk Orchestration Profiler .
بازی جراحی قلب
I use this instruction to doing better my works..
Left by robbert on Sep 30, 2016 9:38 PM

Your comment:
 (will show your gravatar)

Copyright © Michael Stephenson | Powered by: