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 came across an annoying one the other day, I havent had time to look into it in more detail, but here are some notes about it.

In some of the tests we do with BizUnit we sometimes check the event log to see that certain messages have occured.  I came across an example I havent noticed before the other day.

In my test I do a bunch of stuff then I wait until a custom event with a specific Event Id is logged to the event log.  I use the BizUnit event log check step and it finds my event fine.

Later in the test I will do the following:

  • Stop the application pool for a web service I will call
  • Allow BizTalk to call the service and then suspend the service instance because the web service is unavailable
  • My test will detect the event logged by BizTalk Event ID - 5754 to indicate a call has failed.  I will also use the ValidationRegEx node to confirm the event message relates to my port
  • I will then start the application pool back up
  • I will then use a custom BizUnit step to resume the suspended instance
  • Finally I will check the process worked correctly

This was working as far as the point of detecting the BizTalk event.  I could see in the event log the event I was expecting was there, but for some reason my step didnt spot it.

Because I was using the regex feature this was my first thought, but the expression was simple and even if I took it away the event wasnt spotted still.

It turns out when I wrote a little C# to check what comes back in the event log was that although the event in Event Viewer displays with the event number 5754, the event log instance from System.Diagnostics comes back with the following property values:

- Event Id: 12588666

- Instance Id: 3233814138

When I changed the event number as appropriate it worked fine.  Frustrating but there you go. 


Posted on Wednesday, July 23, 2008 5:48 PM BizTalk , BizTalk Testing | Back to top

Comments on this post: Detecting BizTalk Event with BizUnit

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Michael Stephenson | Powered by: