Test map to flat file in BTS 2013r2 - does this ever work?
I have lots of BTS2010 unit tests that check an XML file can be mapped to flat file.

I have developed my first of such tests on BTS2013r2 but on executing TestableMapBase.TestMap(_inputFilename, _inputType, outputFilename, _outputType), I get the error "Generate schema instance failure"

I've used reflector to debug the MS assemblies and got as far as the following line within CFrameworkSchemaTreeExtensions.cs of Microsoft.BizTalk.TOM.Adapter :

infoArray = instanceGenerator.GenerateInstance(filename, xmlInstance);

on executing, the infoArray is populated with the following error

ErrorInfo: hexadecimal value 0x00, is an invalid character. Line 2, position 1."

Prior to executing I have taken the content of xmlInstance, pasted into Notepad++ and used the Hex plugin to search for null characters (hex 0x00), there are  none.

I have tried many different XML inputs to the maps on two different BizTalk development laptops and get the same result.

Has anyone been able to successfully run tests of XML to flat file in BTS2013r2?
December 30th, 2014 1:49pm

According to the error message above, this is general error message, could you BAM tool to get more information about this issue?
Free Windows Admin Tool Kit Click here and download it now
December 31st, 2014 6:10am

I think its part of the same issue which has been reported as bug with map unit test inside Microsoft.BizTalk.TestTools.dll.

Refer: Map Unit test does not work in BizTalk 2013 because TestableMapBase class is not correct.

Microsoft had missed on to upgrade TestableMapBase class. They still using the BTSXslTransform instead of using XslCompiledTransform witch will cause the TestMap() function to failed.

Sandro has provided a wrapper class to perform Unit testing in Maps.

Refer: BizTalk Server 2013: Wrapper classes to perform Unit Testing in Maps

BizTalk Server 2013: Step-by-Step to implement Unit Testing in Schemas and Maps

Regards,

Rachit


December 31st, 2014 8:40am

I think its part of the same issue which has been reported as bug with map unit test inside Microsoft.BizTalk.TestTools.dll.

Refer: Map Unit test does not work in BizTalk 2013 because TestableMapBase class is not correct.

Microsoft had missed on to upgrade TestableMapBase class. They still using the BTSXslTransform instead of using XslCompiledTransform witch will cause the TestMap() function to failed.

Sandro has provided a wrapper class to perform Unit testing in Maps.

Refer: BizTalk Server 2013: Wrapper classes to perform Unit Testing in Maps

BizTalk Server 2013: Step-by-Step to implement Unit Testing in Schemas and Maps

Regards,

Rachit


Free Windows Admin Tool Kit Click here and download it now
December 31st, 2014 8:40am

I think its part of the same issue which has been reported as bug with map unit test inside Microsoft.BizTalk.TestTools.dll.

Refer: Map Unit test does not work in BizTalk 2013 because TestableMapBase class is not correct.

Microsoft had missed on to upgrade TestableMapBase class. They still using the BTSXslTransform instead of using XslCompiledTransform witch will cause the TestMap() function to failed.

Sandro has provided a wrapper class to perform Unit testing in Maps.

Refer: BizTalk Server 2013: Wrapper classes to perform Unit Testing in Maps

BizTalk Server 2013: Step-by-Step to implement Unit Testing in Schemas and Maps

Regards,

Rachit


December 31st, 2014 8:40am

I think its part of the same issue which has been reported as bug with map unit test inside Microsoft.BizTalk.TestTools.dll.

Refer: Map Unit test does not work in BizTalk 2013 because TestableMapBase class is not correct.

Microsoft had missed on to upgrade TestableMapBase class. They still using the BTSXslTransform instead of using XslCompiledTransform witch will cause the TestMap() function to failed.

Sandro has provided a wrapper class to perform Unit testing in Maps.

Refer: BizTalk Server 2013: Wrapper classes to perform Unit Testing in Maps

BizTalk Server 2013: Step-by-Step to implement Unit Testing in Schemas and Maps

Regards,

Rachit


Free Windows Admin Tool Kit Click here and download it now
December 31st, 2014 11:40am

I think its part of the same issue which has been reported as bug with map unit test inside Microsoft.BizTalk.TestTools.dll.

Refer: Map Unit test does not work in BizTalk 2013 because TestableMapBase class is not correct.

Microsoft had missed on to upgrade TestableMapBase class. They still using the BTSXslTransform instead of using XslCompiledTransform witch will cause the TestMap() function to failed.

Sandro has provided a wrapper class to perform Unit testing in Maps.

Refer: BizTalk Server 2013: Wrapper classes to perform Unit Testing in Maps

BizTalk Server 2013: Step-by-Step to implement Unit Testing in Schemas and Maps

Regards,

Rachit


December 31st, 2014 11:40am

The is not related to BAM
Free Windows Admin Tool Kit Click here and download it now
December 31st, 2014 12:51pm

I have previously used Sandro's wrapper class when working with BTS2013r1.

Although my current problem also stems from Testable Map Base class - they are different. Whereas previously is wasn't possible even to test XML to XML maps in a unit test, now that works ok but fails when requesting the generation of a flat file.

Today I have created the most basic of solutions (1 BizTalk project + 1 unit test project) in order to test if this really is a Microsoft bug. It does seem that way because I got the same error when running this very simple test on a third BizTalk development laptop. I have added the source code to the following github repo: https://github.com/RobBowman/FFMapFailBTS2013r2

What's the best way to log this as a defect with Microsoft?

December 31st, 2014 12:57pm

Hi Rob,

Check the following link to raise a Microsoft support call for BizTalk:

https://support2.microsoft.com/oas/default.aspx?gprid=17988&st=1&wfxredirect=1&sd=gn

https://support2.microsoft.com/select/default.aspx?target=assistance&ln=en-gb

Rachit

Free Windows Admin Tool Kit Click here and download it now
December 31st, 2014 1:07pm

Hi Rob,

I tried my luck as well but failed . This may be bug which need to be raised . Better to raise this as bug as per my go

        public void TestUserMap()
        {
            string inputTestFile = @"C:\Abhishek\intput.xml";
            Microsoft.BizTalk.TestTools.Mapper.TestableMapBase map = new TTestMapper.Samplemap();                     
            string outputTestFile = @"c:\Abhishek\Sample_Request.xml";            
            map.TestMap(inputTestFile, Microsoft.BizTalk.TestTools.Schema.InputInstanceType.Xml, outputTestFile, Microsoft.BizTalk.TestTools.Schema.OutputInstanceType.XML);

            Assert.IsTrue(File.Exists(outputTestFile), "Failed");
        }

Thanks

Abhishek


December 31st, 2014 1:41pm

Hi Rob,

I tried my luck as well but failed . This may be bug which need to be raised . Better to raise this as bug as per my go

        public void TestUserMap()
        {
            string inputTestFile = @"C:\Abhishek\intput.xml";
            Microsoft.BizTalk.TestTools.Mapper.TestableMapBase map = new TTestMapper.Samplemap();                     
            string outputTestFile = @"c:\Abhishek\Sample_Request.xml";            
            map.TestMap(inputTestFile, Microsoft.BizTalk.TestTools.Schema.InputInstanceType.Xml, outputTestFile, Microsoft.BizTalk.TestTools.Schema.OutputInstanceType.XML);

            Assert.IsTrue(File.Exists(outputTestFile), "Failed");
        }

Thanks

Abhishek


Free Windows Admin Tool Kit Click here and download it now
December 31st, 2014 1:41pm

Hi Rob,

I tried my luck as well but failed . This may be bug which need to be raised . Better to raise this as bug as per my go

        public void TestUserMap()
        {
            string inputTestFile = @"C:\Abhishek\intput.xml";
            Microsoft.BizTalk.TestTools.Mapper.TestableMapBase map = new TTestMapper.Samplemap();                     
            string outputTestFile = @"c:\Abhishek\Sample_Request.xml";            
            map.TestMap(inputTestFile, Microsoft.BizTalk.TestTools.Schema.InputInstanceType.Xml, outputTestFile, Microsoft.BizTalk.TestTools.Schema.OutputInstanceType.XML);

            Assert.IsTrue(File.Exists(outputTestFile), "Failed");
        }

Thanks

Abhishek


December 31st, 2014 1:41pm

Hi Rob,

I tried my luck as well but failed . This may be bug which need to be raised . Better to raise this as bug as per my go

        public void TestUserMap()
        {
            string inputTestFile = @"C:\Abhishek\intput.xml";
            Microsoft.BizTalk.TestTools.Mapper.TestableMapBase map = new TTestMapper.Samplemap();                     
            string outputTestFile = @"c:\Abhishek\Sample_Request.xml";            
            map.TestMap(inputTestFile, Microsoft.BizTalk.TestTools.Schema.InputInstanceType.Xml, outputTestFile, Microsoft.BizTalk.TestTools.Schema.OutputInstanceType.XML);

            Assert.IsTrue(File.Exists(outputTestFile), "Failed");
        }

Thanks

Abhishek


Free Windows Admin Tool Kit Click here and download it now
December 31st, 2014 4:41pm

Hi Rob,

I tried my luck as well but failed . This may be bug which need to be raised . Better to raise this as bug as per my go

        public void TestUserMap()
        {
            string inputTestFile = @"C:\Abhishek\intput.xml";
            Microsoft.BizTalk.TestTools.Mapper.TestableMapBase map = new TTestMapper.Samplemap();                     
            string outputTestFile = @"c:\Abhishek\Sample_Request.xml";            
            map.TestMap(inputTestFile, Microsoft.BizTalk.TestTools.Schema.InputInstanceType.Xml, outputTestFile, Microsoft.BizTalk.TestTools.Schema.OutputInstanceType.XML);

            Assert.IsTrue(File.Exists(outputTestFile), "Failed");
        }

Thanks

Abhishek


December 31st, 2014 4:41pm

Thanks for checking Abhishek. I notice that you have given output type of XML. I only face the problem is I give an output type of Native.

I have now raised a support request with Microsoft, hopefully we'll they'll be able to let me know the cause.

Free Windows Admin Tool Kit Click here and download it now
January 1st, 2015 8:59am

Thanks for checking Abhishek. I notice that you have given output type of XML. I only face the problem is I give an output type of Native.

I have now raised a support request with Microsoft, hopefully we'll they'll be able to let me know the cause.

January 1st, 2015 8:59am

Thanks for checking Abhishek. I notice that you have given output type of XML. I only face the problem is I give an output type of Native.

I have now raised a support request with Microsoft, hopefully we'll they'll be able to let me know the cause.

Free Windows Admin Tool Kit Click here and download it now
January 1st, 2015 8:59am

Thanks for checking Abhishek. I notice that you have given output type of XML. I only face the problem is I give an output type of Native.

I have now raised a support request with Microsoft, hopefully we'll they'll be able to let me know the cause.

January 1st, 2015 11:59am

Thanks for checking Abhishek. I notice that you have given output type of XML. I only face the problem is I give an output type of Native.

I have now raised a support request with Microsoft, hopefully we'll they'll be able to let me know the cause.

Free Windows Admin Tool Kit Click here and download it now
January 1st, 2015 11:59am

Hi Rob,

Please, keep us informed of the progress of this bug. Now I assume this is a MS bug and marked you post as answer.

January 2nd, 2015 8:41pm

Thanks Rachit, I have raised a support ticket for this issue
Free Windows Admin Tool Kit Click here and download it now
January 2nd, 2015 10:18pm

Hi Leonid,

The support ticket is currently open and MS are investigating. I will post back once they have completed.

Thanks,

Rob.

January 2nd, 2015 10:19pm

Microsoft have  now confirmed the cause of this issue is a bug in BizTalk 2013r2. They have passed this to the BizTalk Product Team who are currently evaluating if / how a fix should be made.

If anyone has a work-around to this problem please post here. My only thoughts currently are to test only to XML in the unit tests then use BizUnit integration tests to check the flat-file conversion - far from ideal!

Free Windows Admin Tool Kit Click here and download it now
January 28th, 2015 4:13pm

Microsoft have  now confirmed the cause of this issue is a bug in BizTalk 2013r2. They have passed this to the BizTalk Product Team who are currently evaluating if / how a fix should be made.

If anyone has a work-around to this problem please post here. My only thoughts currently are to test only to XML in the unit tests then use BizUnit integration tests to check the flat-file conversion - far from ideal!

January 28th, 2015 4:13pm

Microsoft have  now confirmed the cause of this issue is a bug in BizTalk 2013r2. They have passed this to the BizTalk Product Team who are currently evaluating if / how a fix should be made.

If anyone has a work-around to this problem please post here. My only thoughts currently are to test only to XML in the unit tests then use BizUnit integration tests to check the flat-file conversion - far from ideal!

Free Windows Admin Tool Kit Click here and download it now
January 28th, 2015 4:13pm

Microsoft have  now confirmed the cause of this issue is a bug in BizTalk 2013r2. They have passed this to the BizTalk Product Team who are currently evaluating if / how a fix should be made.

If anyone has a work-around to this problem please post here. My only thoughts currently are to test only to XML in the unit tests then use BizUnit integration tests to check the flat-file conversion - far from ideal!

January 28th, 2015 7:13pm

Microsoft have  now confirmed the cause of this issue is a bug in BizTalk 2013r2. They have passed this to the BizTalk Product Team who are currently evaluating if / how a fix should be made.

If anyone has a work-around to this problem please post here. My only thoughts currently are to test only to XML in the unit tests then use BizUnit integration tests to check the flat-file conversion - far from ideal!

Free Windows Admin Tool Kit Click here and download it now
January 28th, 2015 7:13pm

Thank you, Rob, for keep us informed!
January 28th, 2015 7:39pm

Microsoft have now made a hotfix available for this, you need to ask for KB3062618
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2015 10:58am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics