This last few days were quite busy in terms of speaking engagements. In less than 1 months I was invited to speak in 3 events: BizTalk Innovation Day Oslo, LIX Edition of SQLPort Community (Porto – Portugal) and in SQLSaturday #341 – Porto, Portugal.

BizTalk Innovation Day Oslo 2014

The first one was in September 25 – BizTalk Innovation Day Oslo, in which I am also a member of the organization team – BizTalkCrew, this was the third consecutive year that this event was third consecutive year but the first time in Oslo, since the others were held in Stavanger. Around 60 attendees + speakers + event organizers, attended the event especially from Norway and Sweden, 5 Microsoft Integration MVP’s present, 3 Sponsors (Microsoft, Bouvet and BizTalk360) and an incalculable number of networking hours these are some of the numbers that reflect the success of this event. These are some of the numbers that reflect the great success of this event!

BizTalk-Innovation-Day-Oslo-Speakers

This was a special event for me! Because after 1 year and a half of hard work I finally release and public announce my free Book about “BizTalk Mapping Patterns & Best Practices” – a 400-page recipe for BizTalk Developers to develop effective, robust, and organized maps that he has previous announce during the BizTalk Summit 2014, London event.

Sandro-Pereira-announcing-his-book-BizTalk-Innovation-Day-Oslo

You can download it at BizTalk360 website here.

My Session – The new Transform Designer available in BizTalk Services

My session was about the new Transform Designer available in BizTalk Services were I addressed the basic differences between the BizTalk Server Mapper and the new Mapper in BizTalk Services, the challenges present while migrating current BizTalk Server maps and how can this task be accomplished. And of course how can we accomplish some of the basic transformation tasks like grouping, shorting and condition transformations. I end my presentation with a very complex transformation challenger that took me a week to solve: mapping a SAP invoice to an EDI Invoice document and wrapping up with the “the good, the bad and the ugly” features of the new Transform Designer.

Sandro-Pereira-at-BizTalk-Innovation-Day-Oslo-2014Sandro-Pereira-at-BizTalk-Innovation-Day-Oslo-2014-2

You can see the full story of the event here: BizTalk Innovation Day, Oslo – story of the day

 

LIX Encontro da Comunidade SQLPort

The second event was a 20-minute talk in the LIX Edition of SQLPort Community meeting in Porto, Portugal about the Concepts and challenges of Enterprise Integration and how can BizTalk Server and BizTalk Services can address them and help organizations in their needs. An Introduction to BizTalk Server. What is? What does BizTalk do? And an Introduction to BizTalk Services. What is? What does BizTalk Services do?

Sandro-Pereira-speaking-at-LIX-SQLPortSandro-Pereira-speaking-at-LIX-SQLPort-cloud-challengesSandro-Pereira-speaking-at-LIX-SQLPort-Integration

 

SQLSaturday #341 – Porto

This was the fourth time that this conference took place in Portugal, but it was the first time that was held in Porto, so was very proud and honor to be selected by the attendees to speak in my first SQLSaturday and in particular to be in my home town. The event was a great success! 22 sessions divided into three tracks, national and international speakers and despise I don’t have official numbers, more than 200 attendees must have passed by the event during the day.

SQLSaturday-341-Porto-Speakers

My Session – Introduction to Microsoft Azure BizTalk Services

I had the pleasure to speak at SQLSaturday #341 Porto to a bright young audience that never heard about BizTalk Server/Services… Hoping to open the door for a new integration “BizTalk” genius and why not working with me!

Sandro-Pereira-at-SQLSaturday-341-PortoSandro-Pereira-SQLSaturday-341-Porto-2Sandro-Pereira-at-SQLSaturday-341-Porto-3

In this session spoke about the existent functionalities in the new integration services in the cloud: Microsoft Azure BizTalk Services: EAI (Enterprise Application Integration) and EDI (Electronic Data Interchange), the challenges in moving from BizTalk Server to BizTalk Services. And the evolving challenges of Enterprise Integration.

 

I was also honor to represent my company DevScope, gold sponsor of this event, in the awards ceremony session. DevScope has offered an entry to Microsoft Azure Machine Learning Master Class that will be held in November 22 in Porto

Sandro-Pereira-awards-ceremony-sessionSQLSaturday-Attendees

This post is for the BizTalk Server and SQL Server Portuguese Community, will be held on October 15, 2014 between 18:30 – 21:50 the LIX SQLPort Community Meeting at the Science and Technology Park of University of Porto (UPTEC) in Oporto.

SQL-Port-Portugal-logo

LIX Encontro da comunidade SQLPort

Realiza-se no dia 15 de Outubro de 2014, o LIX Encontro da comunidade SQLPort, que tem como objectivo a partilha de experiências e conhecimento entre os profissionais e entusiastas de SQL Server em Portugal. O evento vai ser realizado no PORTO, no auditório da UPTEC, pelas 18:30, sendo a entrada livre para todos os inscritos.

Os nossos oradores confirmados são Sandro Pereira (MVP), Ivan Campos, Rui Marinho, Niko Neugebauer (MVP), Fabiano Amorim (MVP) e Murilo Miranda (MVP)

As sessões estão sobre segredo absoluto mas será um evento a não perder!

A Agenda…

18:30: Abertura e recepção;

19:30: Community News

19:10: 3 Apresentações – Oradores

20:10: Networking / Coffee Break;

20:30: 3 Apresentações – Oradores

21:30: Sorteio de prémios

21:30: Fim do evento;

22:00: Jantar livre

Data Evento: 15 Outubro 2014 – 18:30H

Local do Evento: Parque de Ciência e Tecnologia da Universidade do Porto (UPTEC) | Rua Alfredo Allen, n.º455/461 | 4200-135 PORTO | Portugal

Saiba mais sobre o evento na página da Comunidade SQLPort.

O evento é gratuito! De que está à espera? Reserve já o seu lugar aqui e participe!

Estamos a sua espera.

I’m proud to announce that I will present a session about BizTalk Services: “Introduction to Microsoft Azure BizTalk Services” at SQLSaturday #341 Porto (Portugal) on October 18th, 2014! I’m excited and it is truly an honor because this is the first time I submit a session to this kind of event and I have been selected by the attendees to speak at a SQLSaturday in my home town.

SQLSaturday-341-Porto-2014-logo

This is the fourth time that this conference takes place in Portugal, but it is the first to be held in Porto, and will have three “tracks” with parallel sessions in three different topics Administration/Development (DBA), Business Intelligence (BI) and Development (.NET).

About my session…

Historically, both EAI and EDI has been performed through BizTalk. With this preview we will give an early glimpse into how Microsoft envisions these types of integration scenarios being addressed in a Platform as a Service (PaaS) based environment.

In this session we’ll look at the existent functionalities in the new integration services in the cloud: Microsoft Azure BizTalk Services: EAI (Enterprise Application Integration) and EDI (Electronic Data Interchange), how to manage the exchange of EDI messages and trading partners through BizTalk Services Portal; Support Flat files, schemas and transformations (maps). And at the challenges in moving from BizTalk Server to BizTalk Services.

Session Level: Beginner

About my coleagues at DevScope…

The event will have well known international speakers, however I want to highlight my coleagues at DevScope that were also invited to deliver sessions at this event. And the contributions of DevScope range from Cloud Services to Server Automation or Mobile Development. There will be plenty of opportunities to meet us in our hometown:

See more about DevScope contribution here: SQLSaturday comes to Porto on Oct 18th

Event scheduler…

My session will start at 12 PM in the Development (.NET). track – room 3 and I will be waiting for you!

my-session-scheduler-in-SQLSaturday-Porto-2014

Chech the full event scheduler here: SQLSaturday #341 Event Scheduler

This is a FREE training event for Data Professionals, Students & Enthusiasts, which shall be held on 18th October 2014 at ISEP – Rua Dr. António Bernardino de Almeida, 431. Admittance to this event is free, all costs are covered by sponsorships.

Please register quickly here: https://www.sqlsaturday.com/341/register.aspx because seating is limited, and let friends and colleagues know about the event.

I public announced for the first time that I was working in an eBook about BizTalk Mapping Patterns and Best Practices, and that it would be published for free, this March during BizTalk Summit 2014 London… Well folks, it’s that time to announce that “BizTalk Mapping Patterns and Best Practices” book – a 400-page recipe for BizTalk Developers to develop effective, robust, and organized maps – is now finally available for you to download at BizTalk360 website here.

BizTalk-Mapping-Patterns-And-Best-Practices

The “BizTalk Mapping Patterns and Best Practices” book is a reference guide mainly intended for BizTalk developers to make their day-to-day lives easier. The book offers insights on how maps work, the most common patterns in real time scenarios, and the best practices to carry out transformations and has as technical reviewers Steef-Jan Wiggers, Nino Crudele, Michael Stephenson and José António Silva. I had been working on this over the last one year, and my original idea of publishing these information as a blog changed in the due course to become a white paper, then finally to a “Community eBook” with about 400-pages and contributions from so many people. I need to thanks BizTalk360 to accept the challenge of publishing its first book and make it available to the community and my employer, DevScope, for given me a lot of leverage to spend time writing this book, but also to actively contribute for the community of BizTalk with articles, blog and conferences.

I would also like to thank my fantastic team of Technical Reviewers composed by three Integration MVP’s: Michael Stephenson, Nino Crudele and Steef-Jan Wiggers and for the person responsible for the initial idea: José António Silva. Thank you for accepting the challenger and thank you for the incredible effort and time to increase the quality of the book. And also to my friend Sónia Gomes (http://ideiasaoscaracois.com) for creating this amazing cover for the book.

Key Features
  • Direct Translation Pattern: Simply move data to a different semantic representation without any manipulation or transformation.
  • Data Translation Pattern: Similar to Direct Translation Pattern with additional step of data manipulation or transformation to match the target system format.
  • Content Enricher Pattern: Set up access to an external data source (say, a database) to enhance the message with missing information.
  • Aggregator Pattern: Similar to Content Enricher Pattern; difference in mapping technique. Multiple inbound requests mapped to single outbound request.
  • Content Filter Pattern: Opposite of Content Enricher Pattern; remove unnecessary items from message (even based on condition) and send what is exactly required
  • Splitter Pattern: Opposite of Aggregator Pattern; single inbound request to be mapped to several outbound requests
  • Grouping Pattern: Example – shopping catalogue where items are grouped under categories like Sports, Women Cosmetics, Electronics, Computers, and so on.
  • Sorting Pattern: In most scenarios, Grouping Pattern and Sorting Pattern will be bound together
  • Conditional Pattern: To receive only portion of the data from the message, apply a condition statement to filter the result set at the source.
  • Looping Pattern: For instance, a record in the source system may occur multiple times in the input file. They need to be transformed according to the target system
  • Canonical Data Model Pattern: Ensures loose coupling between applications; if new application is added, only the transformation between the Canonical Data Model has to be created.
  • Name-Value Transformation Pattern: Target system requires a Name-Value Pair (NVP) structure; or the source system has a NVP structure and the target requires a hierarchical schema

Click here to download your free copy of the book.

Why I did not choose a “proper” publisher?

Some people have asked me why I didn’t publish my book in a real proper publisher like Apress, Packt Publishing or others and the reason is simple… I could easily and had the chance to publish but it would be a paid book and what I really wanted was to create and deliver to the community my first book (I don’t know if I will write or not more books) for free as a way to thank you for the affection and support that all of you have given me in the last years.

BizTalk360 was the proper choice because I know the people and I know I could count on them to publish making it available to the community for free and promote the book.

When was the book released?

The book was public announced during the BizTalk Innovation Day, Oslo (Norway) 2014 event and I could not have chosen a better place and audience to present my book because the idea of creating this book started after a session of one of our events: BizTalk Innovation Day Oporto, the venue was really amazing in a kind of nightclub for event (actually MESH is also a nightclub J) and the Norwegian audience is really amazing and I have good friends there.

Here is the moment of the official announcement:

983808_10154679875790215_4831962891112983455_n10712741_10154679875665215_8135613065073045386_n
10639568_10154679875950215_5466833305087056286_n10689790_10154679875865215_4412905719135280171_n

Please give me your feedback

Your opinion is very important to me. I appreciate your feedback and I will use it to evaluate changes and make improvements in the book and future projects.

book-critic

Download the book for free

BizTalk-Mapping-Patterns-Best-Practices-banner

The book if available for you to download for free at BizTalk360 website here: BizTalk Mapping Patterns & Best Practices

I miss the old BizTalk Hotrod Magazine, of my knowledge, there isn’t no other type of magazine about BizTalk Server. And the only thing we have approximately to that is the Flipboard BizTalk Magazine that I have weekly published throughout these last months.

You can find the BizTalkMagazine into Flipboard in in your favorite device Apple (iPhone, iPad), Android, Windows 8, and so on… or simply through the Internet browser at: https://flipboard.com/section/biztalkmagazine-bMJFWI

I start this project because I didn’t have the knowledge and the time required to create a PDF magazine similar to the BizTalk Hotrod Magazine, and Flipboard gave me an easy and simple way to share content in a type of magazine format.

Now it seams a little limited and after all this months I would like to take the magazine to a new level and recreate some of the concept of BizTalk Hotrod magazine, inviting authors to write articles to be published and share other resources like tools, scripts, adapters and so on… probably launching a magazine every month or quarterly.

To try this concept I decided to publish a beta version of the magazine as a proof of concept that now is available for you to download here: BizTalk Magazine – September 2014 Edition – probably the magazine name should be different.

Capture

This first edition contains:

  • BizTalk Innovation Day, Oslo – Norway
  • BizTalk Server 2013: Step-by-Step to implement Unit Testing in Schemas and Maps
  • "INTEGRATE – 2014"– Announcing the Global BizTalk Summit, Microsoft Campus, WA. Dec 3-5, 2014
  • BizTalk Administrator Deep dive course
  • Exposing data through BizTalk Service Hybrid Connections
  • BizTalk Server SQL Agent Jobs

Have a nice read! And If you have any suggestions feel free to comment, your feedback is important.

In the last few weeks I have been doing BizTalk project migrations successfully from BizTalk Server 2006 and Visual Studio 2005 to recent version: BizTalk Server 2010/VS 2010 or BizTalk Server 2013/VS2012. In most of the scenario this is a simple task and regarding to Visual Studio we basically just need to open the “old” solution with the “new” Visual Studio and it will try to convert the solution using the Visual Studio Conversion Wizard tool, check more details in one of my previous post: BizTalk 2010 – Migrate an old BizTalk Visual Studio solution to Visual Studio 2010.

Of course this part is just the Visual Studio project migration, and in some cases we need to make adjustments to our solution.

However recently I face a strange problem when I was trying to convert the Visual Studio solution, every time I tried it gave me the following error:

“Unable to read the project file “…\MyProject.btproj.user”. The project file could not be loaded. Root element is missing.”

The-imported-project-file-could-not-be-loaded-Root-element-is-missing

CAUSE

“*.btproj.user” file. This is a XML file that contains not only the BizTalk deployment Settings but also several personal user settings like References path, test file names and so on.

I’m not sure what did happen with this file while copying the project to the new server, or during it’s time life in the former development server. However when I check the file system for this file I noticed that the file was empty:

MyProject-btproj-user-file

SOLUTION

To solve this problem you just need to delete this User configuration file (*.btproj.user) from the file system and try to import de project or convert the solution again.

BizTalk-Solution-imported-successfully

BizTalk Health Monitor is a snap-in, basically it’s the same of BizTalk MsgBoxViewer tool that we used monitor a BizTalk environment by gathering all information of a BizTalk group and detecting any issues, non-critical or critical warnings to detect any potential problems in advance, but in this case is integrated more closely with the BizTalk Administration Console to provide BizTalk administrators a quick and complete dashboard of a BizTalk group which will help them monitor the health of their BizTalk platform.

You can see more info about BizTalk Health Monitor (BHM) at:

BHM was originally released as a new feature with BizTalk Server 2013 R2 but luckily for us Microsoft decided to release a standalone version of BHM for use with BizTalk Server 2010 and BizTalk Server 2013.

You can download the standalone version of BHM from Microsoft Download Center here: BizTalk Health Monitor

How to install BizTalk Health Monitor snap-in

Prerequisites:

  • BizTalk Server 2010 or 2013 should be installed and configured.
How to register BizTalk Health Monitor Snap-In

After you download and unzip the BHM.ZIP file from the Microsoft Download Center, you the “InstallUtil.exe” which comes with BizTalk Health Monitor tool to register the BHM snap in.

Important: Unzip the BHM.ZIP to a final destination before you register the snap-in for example: C:\Program Files (x86)\Microsoft BizTalk Server 2010\SDK\Utilities\BHM. Once you register the BizTalk Health Monitor Snap-In you cannot delete the folder or BHM will stop working

To accomplished that we need to:

  • Open a command prompt as an administrator
  • Navigate to the directory file where you unzipped the BHM.ZIP file
    • For example: C:\Program Files (x86)\Microsoft BizTalk Server 2010\SDK\Utilities\BHM
  • And from the command prompt type:
    • InstallUtil.exe MBVSnapIn.dll
  • And hit enter. This step will do some registry changes and register the SnapIn to be used

 

How to integrate BHM Snap-In into BizTalk Admin Console

Important note: BHM Snap-In can be used independently and need not to be integrated with BizTalk Administration Console. The handicap of this approach is that a BizTalk Administration will need to use two different places/tools to monitor and administrate the environment.

To be easier and more convenience for BizTalk Administrators BHM Snap-In can also be integrate it so that it can be used with BizTalk Administration Console.

To accomplished that we need to open a 32-bit Microsoft Management Console (MMC):

  • Click Start, click Run, type:
    • mmc /32
  • Press enter or click OK. This will open a new 32-bit version of MMC (MMC32).
  • From MMC console, go to File menu and select “Options…” option
    • In the text box, replace “Console1” for “BizTalk Administration Console”
    • In the Console mode combo box, select “User mode – full access”
    • And confirm that the option “Do not save changes to this console” is uncheck

MMC-console-properties

  • From MMC console, go to File menu and select “Add/Remove Snap-in…” option

MMC-window-Add-Remove-Snap-in

  • From the “Add or Remove Snap-ins” window, add following snap-ins and then click Ok
    • Microsoft BizTalk Server Administration
    • BizTalk Health Monitor

MMC-window-Add-or-Remove-Snap-ins-selection

    • You can add the snap-ins by selecting them from the “Available snap-ins” list and click “Add >”
    • Is recommend that you respect the order present in the “Selected snap-ins” list as showed in the picture above
  • This will generate for us a new MMC which contains both the BizTalk Server Administration and BizTalk Health Monitor. And by now your new MMC is ready which shows both the BizTalk Server Administration and BizTalk Health Monitor

new-BizTalk-Administration-Console

Now you might want to save this as a new .msc file so that you don’t have to repeat these steps again but before we complete the creation process of the “new” BizTalk Administration Console, I recommend that you navigate to the BizTalk Server Installation folder:

  • Example: C:\Program Files (x86)\Microsoft BizTalk Server 2010
  • And rename “BTSmmc.msc” file, for example: “BTSmmc-old.msc”

This because we will save the “new” BizTalk Administration Console as “BTSmmc.msc” so that you don’t need to create new shortcuts or having different ways to access the BizTalk Administration Console – however this step is optional!

To finished the creation process of the “new” BizTalk Administration Console

  • From MMC console, go to File menu and select “Save As…” option:
    • Give a name and then save it.
      • Access to BizTalk Server Installation folder
        • C:\Program Files (x86)\Microsoft BizTalk Server 2010
      • Save the file as “BTSmmc.msc”

From next time onwards, when you open the BizTalk Server Administration Console

start-BizTalk-Administration-Console

The “new” BizTalk Administration Console will be incorporated with the BizTalk Health Monitor

BizTalk-Administration-Console-with-BizTalk-Health-Monitor

You can download the standalone version of BHM from Microsoft Download Center here: BizTalk Health Monitor

In my last post I explained how to implement Unit Testing in Schemas and Maps in BizTalk Server 2013 project within Visual Studio 2012. I also describe that there is an issue when we try to perform Unit Testing in maps and each time we try to run the unit test it give us the following error: “Microsoft.BizTalk.TestTools.BizTalkTestAssertFailException: Transform Failure

Until Microsoft fix this bug, probably in next releases of CU’s, one workaround that you can implement was described also in my last post, i.e., using a custom wrapper classes based on Microsoft.BizTalk.TestTools.dll to solved the current issues.

However Paul Nichols from Mexia alerted me with a Michael Stephenson post: BizTalk 2013 Map Unit Testing Gotcha, to the fact that I could use a Test Settings file which forces the tests to run in 32-bit mode and solve the problem that I was facing with maps without having the necessity to use a custom assembly… so I decide to try it.

Unit tests in Visual Studio 2012 can be configured by using a “.runsettings” file (“.runsettings” is new in Visual Studio 2012 – if you’re familiar with unit testing in previous versions of Visual Studio, you might know about “.testsettings files”). For example, you can change the .NET Framework on which the tests will be run, the directory where test results are delivered, and the data collected during a test run.

You can still use “.testsettings” in Visual Studio 2012, so any test configurations you wrote for previous editions will still work. But “.testsettings” can be used only to configure tests written for the MSTest adapter. By contrast, “.runsettings” can be used with any of the adapters built for the extensible unit test framework in Visual Studio 2012, such as xUnit.net and NUnit.

You still need a “.testsettings” file for some kinds of tests:

  • Tests that are deployed on a lab environment.
  • Web performance and load tests.
  • Customizing some types of diagnostic data adapters, such as IntelliTrace and ent log
  • BizTalk Server maps (workaround)
Maps Unit Testing Workaround 2 (add .testsettings file)

Unfortunately, if we add a “.runsettings” file and forces the tests to run in 32-bit mode, see an example of this Test Settings file here, our test project still doesn’t work!

However if we take the “.testsettings” file that was generated for example in Visual Studio 2010/BizTalk Server 2010 and add this file to our Test project in Visual Studio 2012/BizTalk Server 2013 or if we add a new “.testsettings” file from our BizTalk solution it works and solve the problem that I was facing, I really don’t know why but is the best workaround that we can implement to solve all the problems.

So to accomplish this we need to:

  • Right click on the BizTalk solution name: “Solution ‘UnitTestingFeatureWithMaps’ (2 projects)”, and select “Add” and them “New Item…”

Visual-Studio-2012-Add-New-TestSettings-file

  • In the “Add New Item – Solution Items” dialog box, expand "Installed" and then choose "Test Settings".
  • From the list of items, select "Test Settings".

Visual-Studio-2012-Add-New-Item-Solution-Items

  • In the Name box, enter "TestSettings.testsettings", and then click "Add".
  • This will open a new window for us to specify the settings of the test settings file, just leave the default setting by click “Close”.

Visual-Studio-2012-Test-Settings-Window

You can add more than one test settings file if you want to be able to switch quickly between different settings.

  • On the Visual Studio main menu choose "Test", choose "Test Settings", and then choose "Test Settings File".

Test-Settings-Select-Test-Settings-File

  • In the "Open Setting File" window select the test setting file that we previous create: "TestSettings.testsettings"

Test-Settings-Select-Test-Settings-File-2

So if we perform the tests again, we will notice that the "Microsoft.BizTalk.TestTools.BizTalkTestAssertFailException: Transform Failure" is solved and the only error that is happening is about a Map output validation failure (intentionally present)

BizTalk-Server-2013-Map-Unit-Testing-result

Thanks Paul Nichols for your comments.

To implement BizTalk Server 2013 unit test within Visual Studio 2012 to test Schemas and Map we need to:

  • Open your BizTalk Project in Visual Studio.NET 2012, in this sample: “UnitTestingFeatureWithMaps.sln”
  • In Solution Explorer, right-click in the BizTalk Server project, in this sample “UnitTestingFeatureWithMaps”, and then click Properties.
    • In Project Designer, click the Deployment property page tab and set “Enable Unit Testing” option to “True”.

BizTalk-Server-2013-Project-Designer-Deployment-property

    • Close the project properties page saving the changes.
  • In main menu, click Build, and then click Rebuild Solution.

To create a unit test project

  • On the File menu, choose “Add”, and then choose “New Project….”
  • In the New Project dialog box, expand “Installed”, expand “Visual C#”, and then choose “Test”.
  • From the list of templates, select “Unit Test Project”.

BizTalk-Server-2013-New-Unit-Test-Project

  • In the Name box, enter “UnitTestProject1″, and then choose “OK”.
  • The “UnitTestProject1″ project is added to the the “UnitTestingFeatureWithMaps” solution.
  • In the “UnitTestProject1″ project, for us to be able to accomplished testing BizTalk Schemas and Maps, we need to manually add the following references to the solution:
    • Microsoft.BizTalk.TestTools – you can find this assembly in the following directory: “C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies\Microsoft.BizTalk.TestTools.dll”
    • Microsoft.XLANGs.BaseTypes – you can find this assembly in the following directory: “C:\Program Files (x86)\Microsoft BizTalk Server 2013\Microsoft.XLANGs.BaseTypes.dll”
    • BizTalk Server project assembly – in this case “UnitTestingFeatureWithMaps”
  • You can accomplish this by:
    • In Solution Explorer, select “References” in the “UnitTestProject1″ project and then choose “Add Reference…” from the context menu.

We need two test class, one for testing the Schema and the other to test the map. We can use the UnitTest1.cs that was generated by the project template, but we should give the file and class more descriptive names. We can do that in one step by renaming the file in Solution Explorer.

To unit test a schema you can leveraging the unit test framework in Visual Studio. In the Unit Test Class you can test methods like below for validating XML document instance:

        /// <summary>
        ///A test for PersonOrigin Constructor
        ///</summary>
        [TestMethod()]
        public void PersonOriginConstructorTest()
        {
            PersonOrigin target = new PersonOrigin();

            //=== Schema input file for validation ===//
            string strSourcePO_XML = testContextInstance.TestDir + "..\\..\\..\\Files\\PersonOrigin.xml";

            //=== Validate the XML Input message against the schema ===//
            Assert.IsTrue(target.ValidateInstance(strSourcePO_XML, 
                Microsoft.BizTalk.TestTools.Schema.OutputInstanceType.XML));
        }

To unit test a map you can leveraging the unit test framework in Visual Studio. In the Unit Test Class you can test method like below for testing a mapping:

        [TestMethod()]
        public void HowMapsWorksMapTest()
        {
            /*********************************************************************************
             * There is a bug with Map Unit Test inside Microsoft.BizTalk.TestTools.dll 
             * 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.
             * 
             * The following code was the expected code for BizTalk Map unit testing 
             *********************************************************************************/

            HowMapsWorks map = new HowMapsWorks();

            //=== Use the HelloWorld sample directory path for the message files ===//
            string strSourcePO_XML = testContextInstance.TestDir + "..\\..\\..\\Files\\PersonOrigin.xml";
            string strDestInvoice_XML = testContextInstance.TestDir + "\\OUT\\PersonTarget2.xml";


            //=== Test the map by using the TestMap method of the TestableMapBase class ===//
            map.ValidateOutput = true;
            map.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));
        }

Maps Unit Testing Workaround (until the hotfix is unavailable)

Unfortunately there is a bug in BizTalk Server 2013 with Map Unit Test inside Microsoft.BizTalk.TestTools.dll, so each time we try to run the unit test for the map it give us the following error:

Microsoft.BizTalk.TestTools.BizTalkTestAssertFailException: Transform Failure
Result StackTrace:   
at Microsoft.BizTalk.TestTools.Mapper.TestableMapBase.PerformTransform(String inputXmlFile, String outputXmlFile)
   at Microsoft.BizTalk.TestTools.Mapper.TestableMapBase.TestMap(String inputInstanceFilename, InputInstanceType inputType, String outputInstanceFilename, OutputInstanceType outputType)

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.
You can find a wrapper (provide by  shadabanwer) here: Map Unit test does not work in BizTalk 2013 because TestableMapBase class is not correct. However there is also a problem with schema (input and output) validation options… so I decide to recreated a new custom wrapper based on Microsoft.BizTalk.TestTools.dll and the solution provided by shadabanwer and fixed all the problems because validating the output instance generated by the map is an important step to validate your maps using Unit Testing. You can find this DLL here: BizTalk Server 2013: Wrapper classes to perform Unit Testing in Maps

You must use this workaround until Microsoft fix this bug.

So to be able to successfully test our maps we need to:

        [TestMethod()]
        public void HowMapsWorksMapTest()
        {
            HowMapsWorks map = new HowMapsWorks();

            //=== Map input file instance to be mapped  ===//
            string strSourcePO_XML = testContextInstance.TestDir + "..\\..\\..\\Files\\PersonOrigin.xml";
            //=== Path for the Map output file instance with the result of the transformation  ===//
            string strDestInvoice_XML = testContextInstance.TestDir + "\\Out\\PersonTarget2.xml";

            //WORKAROUND SOLUTION to test maps
            SandroPereira.BizTalk.MapTestTools.TestableMapBase mapper = new SandroPereira.BizTalk.MapTestTools.TestableMapBase();

            mapper.Mapper = map;
            mapper.Mapper.ValidateOutput = true;

            //=== Test the map by using the TestMap method of a custom TestableMapBase class ===//
            //=== that uses the XslCompiledTransform. This class is basically an improved    ===//
            //=== clone of the class present in the Microsoft.BizTalk.TestTools DLL          ===//
            mapper.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));
        }

Check the full detailed article here: BizTalk Server 2013: Step-by-Step to implement Unit Testing in Schemas and Maps

BizTalk Server 2013: Using the Unit Testing Feature with Schemas and Maps (500.3 KB)
Microsoft | TechNet Gallery

Great news for the BizTalk community, for the third time the BizTalkCrew (Steef-Jan Wiggers, Tord Glad Nordahl, Nino Crudele, Saravana Kumar and me) are hosting the BizTalk Innovation Day, an one-day event focused purely on Microsoft BizTalk Server/BizTalk Services and related topics, in Norway!

The two previous BizTalk Innovation Day editions in Norway were carried out in Stavanger, this time the event will be held in Oslo, Thursday, September 25, 2014 from 9:00 AM to 6:30 PM at MESH AS, Tordenskiolds Gate 3, 0160 Oslo, Norway (see more information about the event and sign up here: BizTalk Innovation Day Sign up)

BizTalk-Innovation-day-Norway-2014

About my session…

Last year I had the opportunity to talk about BizTalk Mapping Patterns and Best Practices, this session led me to write a book about this topic, book that I have been writing for the past 12 months… more news will be release during the event.

This year I decide not to choose any topic and leave this task to the host of the event. So I ask to Tord Glad Nordahl, please choose a topic that the Norwegian community want to hear me speak, that pleases and interest them, I can speak about whatever you want! So it’s not my fault that Tord chose a similar topic Smile… my session will be this year about transformation in BizTalk Services, here is the abstract:

Migrating current BizTalk Server projects to BizTalk Services or starting new BizTalk Services projects can provide some challenges because although the developing experience is very similar, we are still talking about a new integration platform on Azure, and one of the main differences is the way we apply messages transformation with the new Transform Designer.

In this session, we will see the main differences between BizTalk Mapper Design (BizTalk Server) and the Transform Designer (BizTalk Services), and will address several other topics as:

  • How can we migrate existing maps by using the BizTalk Map Migration Tool and what are the limitations?
  • Can we use the existent maps in BizTalk Services projects?

However, mainly we address and explain how you can apply some common mapper problems, how the editor works, what are the functionalities and hopefully you will enhance new skills on BizTalk Services transformations

Target Audience

People interested in BizTalk Server/BizTalk Services and integration on several different levels, developers, administrators and architects. There is something for everyone

Agenda

So we invite you all to join us next September 25, 2014 in Oslo, Norway, where you can count with the following agenda:

08:45 – 09:00: Registration/Welcome/Kick-Off;

09:00 – 10:00: Hitchhiker’s guide to integration with Microsoft Azure BizTalk Service
by Steef-Jan Wiggers [Microsoft Integration MVP];

10:00 – 11:00: The Future of Integration
by Richard Seroter [Microsoft Integration MVP];

11:00 – 11:30: Break;

11:30 – 12:30: Developing like an Integration Person
by Nino Crudele [Microsoft Integration MVP];

12:30 – 13:30: Lunch;

13:30 – 14:30: Top 10 features we added in BizTalk360 in 2014
by Saravana Kumar [Microsoft Integration MVP];

14:30 – 15:30: The new Transform Designer available in BizTalk Services
by Sandro Pereira [Microsoft Integration MVP];

15:30 – 16:00: Break;

16:00 – 17:00: Developers Vs. Operation
by Tord Glad Nordahl [Microsoft Integration MVP];

17:00 – 22:00: Networking/Drinks

Click here to ensure your registration or to get more information’s about this event.

Sign up now and ensure your presence!

Last year was like this….

It was the biggest BizTalk event organized in Norway with a total of 70 people attended in this two days event, 6 Microsoft Integration MVP’s present as speakers and 1 member of Microsoft Product group, these are some of the numbers that reflect the huge success of this event!

1374196_656417837709552_1939283664_n577355_656417451042924_157939711_n539118_656417607709575_1484086093_n1380741_656417711042898_1267435491_n1231532_656417917709544_607306574_n1381450_656417994376203_490756296_n1379931_656418897709446_2064622026_n

553052_656418094376193_922409271_n1377565_740038886023088_1623312865_n1378846_656418134376189_836271093_n1380172_656418031042866_267856785_n1381701_656418584376144_720013891_n

Check more in our Facebook page.

Again, Reserve your ticket at http://www.biztalk360.com/Events/BizTalk-Innovation-day-2014-Norway/ and we are looking forward to welcoming you to Oslo for the BizTalk Innovation Day Norway in September, 25!