Hi All ,
We are using BizTalk 2013 . All of our applications have most of the logic written in maps and the maps are 90% custom xslt’s.
We have started using Visual Studio 2012 unit testing frame work to write unit tests for each of the map .
Example is as below
public void POToInvoiceMapTest()
{
POToInvoice target = new POToInvoice();
//=== Use the HelloWorld sample directory path for the message files ===//
string strSourcePO_XML = testContextInstance.TestDir + "..\\..\\..\\SamplePOInput.xml";
string strDestInvoice_XML = testContextInstance.TestDir + "..\\..\\..\\SampleInvoiceOutput.xml";
//=== Test the map by using the TestMap method of the TestableMapBase class ===//
target.ValidateOutput = true;
target.TestMap(strSourcePO_XML,
Microsoft.BizTalk.TestTools.Schema.InputInstanceType.Xml,
strDestInvoice_XML,
Microsoft.BizTalk.TestTools.Schema.OutputInstanceType.XML);
//=== Output file should be created as a result of testing the map ===//
Assert.IsTrue(File.Exists(strDestInvoice_XML));
}
The tests usually run fine , but we want to analyze the code coverage for the tests . When we run the analyze code coverage the code coverage that is shown is that of the Unitest.cs class and not for the actual xslt .
Usually C#.net the code coverage analysis shows the class library or helper which is called ,its code coverage .
How do we measure the code coverage for map unit tests in BizTalk ?
Any help would be really appreciated !!!
Thanks