How can we test the maps from visual studio if we have multiple schemas in the input?
for example: if the source schemas are having 5 different messages and o/p is transforming to a single message ,how can we achieve the map testing?
Technology Tips and News
How can we test the maps from visual studio if we have multiple schemas in the input?
for example: if the source schemas are having 5 different messages and o/p is transforming to a single message ,how can we achieve the map testing?
Hi Shalini,
Visual Studio doesnt allow to define multiple instances in the TestMap Input Instance property, it only allows one instance message. But when a map has multiple source schemas, they are wrapped in a hierarchy multi-part message created by BizTalk.So the only way to test this type of maps is to provide with an instance of the message in the TestMap Input Instance property that matched with the hierarchy multi-part message created by BizTalk.
Refer this article around the same written by Sandro - How can we test many-to-one or many-to-many maps inside Visual Studio?
Alternatively, you can also refer the approach explained in the link Testing a multiple input map with Visual Studio 2010
There are multiple ways of doing it, I wouls suggest the following approach to test it.
1>Create the map, right click on it and pick validate map : It will give do the xsl validation and let you know if something is wrong.
2>Go to the properties of the map, pick the ip validation as false and op validation as true. Now go back to the map and pick tet map. This will insure the op coming out of the map is per the contract of the xml map will create as op. This scenario I am testing with dummy data which VS will generate for you.
3> If possible get the real instance of ip and test it like above , in this case you can keep ip validation as true.
Note: Most likely you will see errors related to data mismatch for scenario 2 because the instance generated by BizTalk has dummy data in it. You can replace those specific nodes on the ip side and retest.
If it is mutipart map, testing can get little tricky. In this case pick for test map: It will give you the dummy I/p instance of your map generated by VS. Copy the dummy xml and replace the mutipart nodes each at a time by real data from your orchestration instance(Most likely your orchestration will already have created all those mutipart msgs in the map).Once done go ahead and give that file as Testmap ip instance property and retest the map.