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 was just refactoring an orchestration today and to help me test it I wanted to query HAT to ensure the orchestration had completed successfully, BizUnit doesn't have a build in step to do this so I created my own which is easy to do thanks to the extensibility of BizUnit. I guess I could probably have used one of the BizUnit database steps and written some fiddly SQL to do this, but a new task would make this fairly reusable.

The xml to use my step is below:






        <TestStep assemblyPath="Acme.BizTalk.Testing.dll" typeName="Acme.BizTalk.Testing.BizUnit.HAT.OrchestrationCompletedQuery">






            <HATConnectionString>server=.;database=biztalkdtadb;integrated security=sspi;</HATConnectionString>            








Some key points to this XML are:


  • The DurationToCheckSeconds is as it says a period of time that HAT will be checked for to see if your orchestration has completed
  • The ExpectedNoOrchestrations allows you to indicate how many instances you expect to find from this query
  • OrchestrationName is the name of the orchestration you are looking for
  • FailIfLess allows you to indicate if an exception should be thrown by the step if it finds less than the expected number of orchestrations
  • FailIfMore allows you to indicate if an exception should be thrown by the step if it finds more than the expected number of orchestrations
  • HATConnectionString is the connection to the HAT database


In my step I will execute a query which will check for instances which started after the start of my BizUnit test (the step gets this from the BizUnit context).


In the example above im basically saying that I want to find atleast 1 instance of my orchestration completing since my test began.


As we all know HAT data sometimes takes a little while to be available. In my step depending on how you configure the settings above it will not necessarily wait the whole duration to check before confirming that the test was ok. For example In my usage above it lets me confirm that at least 1 instance is in HAT since my test begun, but I don't want to wait for ages ensuring that only 1 instance is there. Because my tests all run serially I can assume that so long as I find 1 instance then my test is good and I can continue as soon as I find it.


The code for the BizUnit step is available to download at the following link:






Posted on Monday, March 23, 2009 6:11 PM BizTalk | Back to top

Comments on this post: BizUnit Step to Query HAT

# re: BizUnit Step to Query HAT
Requesting Gravatar...
Mobdro is another video-streaming or mobile tv software download system for those people. It's wise for viewing television stations like ESPN, TNT, along with also others. It's greater than 200 television channels. The portion of working with that really is the fact that free of charge it's possible to utilize it to get a life and yearly to get this or you've got to provide a charge should you would like to use some superior options also watch live tv on smart tv free
Left by wadfre on Oct 26, 2017 8:46 PM

Your comment:
 (will show your gravatar)

Copyright © Michael Stephenson | Powered by: