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
Ive been trying to get the sample for the BizTalk Map unit testing scenario working.  I kept getting the following error:

"Transformation Failure" 

This was happening everytime I executed the test even though you could test the map fine in the Visual Studio IDE.

While troubleshooting this I also tried using code which would execute the map in C# outside of the BizTalk Unit Testing feature based on Tommaso's article.  When I did this I was getting the following errors:

  • The type initializer for 'Microsoft.BizTalk.ScalableTransformation.BTSXslTransform' threw an exception.
  • The type initializer for 'Microsoft.BizTalk.CommonSettings.CBizTalkSettingsLookup' threw an exception.
  • Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

When I ran Tomasso's application it was able to execute the map successfully which lead me to believe that it must be something to do with the fact the code would be running inside of the MsTest execution environment.

Eventually I found a solution to this.  I added a test settings file to my solution and referenced this in the TEST menu so it was the active test settings.  When I did this running the test with the BizTalk Unit Testing feature and running the test using C# to execute the map both worked fine.  I didnt need to modify any settings in the test settings file, I just left them as the defaults.

Im not quite sure of the exact cause of the problem but this fixed things for me.  Its a shame the error messages in this case made things really painful to workout the root cause of the error.
Posted on Sunday, May 5, 2013 3:59 PM BizTalk Testing | Back to top


Comments on this post: BizTalk 2013 Map Unit Testing Gotcha

# re: BizTalk 2013 Map Unit Testing Gotcha
Requesting Gravatar...
Hi Michael,

Very nice that the BizTalk test tool has helped you to resolve the problem! If you have any questions or comments let me know.

Greetings,

Tomasso Groenendijk
Left by Tomasso Groenendijk on May 14, 2013 12:23 AM

# re: BizTalk 2013 Map Unit Testing Gotcha
Requesting Gravatar...
Michael, did you find the cause of this?
I'm working on the 2013 version of the BSF and ran into the same, but sofar wasn't able to fix it with the BizTalk components.
Have you seen this blogpost?
http://shadabanwer.wordpress.com/2013/06/14/map-unit-test-does-not-work-in-biztalk-2013-because-testablemapbase-class-is-not-correct/

According to your findings, this could not be the real cause, right? Otherwise your test settings wouldn't have fixed it.
Left by Jean-Paul Smit on Jun 27, 2013 7:46 PM

# re: BizTalk 2013 Map Unit Testing Gotcha
Requesting Gravatar...
I got the same exception while testing the transformations with VS2015 MS Unittesting Framework, after changing to VS2013 and testing with it didnt get those errors anymore.
Left by Devrim Kural on Dec 01, 2015 9:28 PM

# re: BizTalk 2013 Map Unit Testing Gotcha
Requesting Gravatar...
I guess the cause of the problem is as Sandro describes here (http://social.technet.microsoft.com/wiki/contents/articles/26333.biztalk-server-2013-step-by-step-to-implement-unit-testing-in-schemas-and-maps.aspx). Sandro's 2nd work-around is the same as yours Mike - use a test setting file!

I am surprised Microsoft haven't got around to fixing this yet. I raised a similar issue with them for 2013r2 and testing against flat-file schemas. They issued me a hotfix pretty quick then rolled that into CU1. It seems like 2013r1 has been forgotten :(
Left by Rob Bowman on Jan 04, 2016 4:58 AM

# re: BizTalk 2013 Map Unit Testing Gotcha
Requesting Gravatar...
Earlier I had tested with VS2015 MS Unittesting Framework however just by changing it to VS2013 the errors were resolved. Such similar framework is also being used in ShowBox app. Go through it's source code.
Left by Jack Flynn on Jun 18, 2017 1:36 AM

# re: BizTalk 2013 Map Unit Testing Gotcha
Requesting Gravatar...
Welcome Reliance JIO free smart mobile lovers, here we are giving you the clear spec Reliance JIO zero 0 mobile features and specifications. http://jiophonebuy.online/
Left by Rajnikant Thalavia on Jul 25, 2017 7:44 AM

# re: BizTalk 2013 Map Unit Testing Gotcha
Requesting Gravatar...
<a href="http://tweakboxdownloads.com/> TweakBox has just been released with a newer version and more paid apps for free.
Left by Ronald on Oct 19, 2017 7:57 PM

Your comment:
 (will show your gravatar)


Copyright © Michael Stephenson | Powered by: GeeksWithBlogs.net