Testing a Deployed Application

Parent Previous Next

More often than not, BizTalk administrators and/or operations staff find themselves in the position of having just deployed a BizTalk application to production -- yet having no idea if the application actually works.  An extremely useful and elegant solution for this problem is to bundle a handful of verification tests with your application.  The Deployment Framework for BizTalk uses NUnit as the foundation for your verification tests.


To include verification tests with your application:


1. Add a .NET Class Library project to your BizTalk solution to house your NUnit tests

If you are using BizTalk 2010 or newer then it's best to target .NET 4.0.  Otherwise, target .NET 3.5 or lower.  Please reference the NUnit documentation for details on how to implement one or more unit test methods within the project.


2.  Set the IncludeDeploymentTest property to true

The property may be included in any PropertyGroup, but is commonly placed in the first PropertyGroup in the project file.


<PropertyGroup>

 ...

 <IncludeDeploymentTest>true</IncludeDeploymentTest>

 ...

</PropertyGroup>


3. Add a DeploymentTest ItemGroup

The following is a typical example that properly follows the common ItemGroup structure:


<ItemGroup>

 <DeploymentTest Include="$(ProjectName).DeploymentTest.dll">

   <LocationPath>..\DeploymentTest\bin\$(Configuration)</LocationPath>

 </DeploymentTest>

</ItemGroup>


The following is the default configuration, which corresponds to the optional naming conventions.  This default is in effect if you do not include any DeploymentTest elements in your project file.


<ItemGroup>

 <DeploymentTest Include="$(ProjectName).DeploymentTest.dll">

   <LocationPath>..\$(ProjectName).DeploymentTest\bin\$(Configuration)</LocationPath>

 </DeploymentTest>

</ItemGroup>


Your NUnit test assembly will automatically be included when you generate an MSI for deployment to a BizTalk server or group.  After the application is installed on the server, the Start menu includes a shortcut to launch the NUnit GUI with the test assembly loaded and ready to run.


Created with the Personal Edition of HelpNDoc: Generate EPub eBooks with ease