locked
Deployment Options for BizTalk TESTING with BTS2009 and TFS2010 RRS feed

  • Question

  • Hello all,

    Haven't been around BizTalk for a while, but I can see that lots have changed!

    Just been engaged by a client to put together a BizTalk 2009 + TFS 2010 build server. No problem I thought, until I discovered that MSBuild appears to have been depreciated in TFS2010, being replaced by WF as the underlying language.

    I (used-to) have a really sweet BizTalk build, deploy and test framework built with MSBuild that I had used for a number of clients in the past (and for my own BizTalk projects); the solution would build the necessary artifacts, deploy to a BizTalk instance (either locally or on the build server), execute BizUnit tests and NUnit tests (as appropriate) and finally extract Application MSIs with environment specific binding files into deployment MSIs.

    I thought this approach made sense because developers could run exactly the same build (+ deploy/test/package) locally as would be run on the build server, thereby picking up any issues with the build script, before committing changes (either to their source or to the build script itself). Unless I'm missing something, with TFS2010 (and I'm more than happy to put my hand up here and ask for help), I don't see that this is now possible.

    So, onto my actual question - I have a BizTalk 2009 build running and completing successfully on a TFS2010 build server, I have unit tests running (against both class library helper functions, pipeline components and transforms, albeit in their 'code' form). HOWEVER, I'm not too sure how to deploy the solution to the local BizTalk instance so that I can run actual end-to-end tests (BizUnit style).

    The Deployment Framework for BizTalk looks like it could be a match, but I get the impression that it is more for creating deployment packages from **already** deployed Applications. Or, can I re-use the deployment portions of my (old?) tried and tested MSBuild scripts? 

    What suggestions does the community have for deploying BizTalk solutions so they can be tested?

    Cheers, Nick.


    Nick Heppleston - Independent UK BizTalk Consultant (http://www.modhul.com)

    Please mark as answered if this answers your question.

    Looking for a fast and efficient way to archive messages in BizTalk? Try Atomic-Scope's new BizTalk Message Archiving Pipeline Component. Download a free 14-day trial!

    Monday, December 5, 2011 10:54 AM

Answers

  • Hi Nick,

    during the nightly build I use the deployment framework (BTDF) for creating the packages on the build server. So my nightly build performs following steps:

    1. Build the SLN

    2. Unittest .NET components

    3. Unittest BizTalk components (maps, pipeline components)

    4. package the solution via BTDF

    from here you need to pick the package and install it to your integration testserver and start the BizUnit tests.

     

     

     



    Regards
    Daniel Saager
    http://www.appliedtechnologies.de dsaager@appliedtechnologies.de
    please mark the post accordingly :-)
    Tuesday, December 6, 2011 7:39 AM
  • Nick,

    I have created a TFS 2010 WF xaml for Building the projects in the solution, then it calls a MSBuild project file in my solution, that deploys all the BizTalk artifacts into a BizTalk instance on my TFS build server, creates and MSI and then imports test bindings, starts everything and goes back to the TFS wf xaml to run any tests in the solution. If you are happy with the results, you can take the MSI to the next environment.

    I am working on a blog post around how this works, but it will be a couple more weeks before that is ready.


    Bill Chesnut | BizTalk Server MVP | Mexia Consulting | Melbourne Australia
    http://www.biztalkbill.com
    Please indicate "Mark as Answer" if this post has answered the question.
    Tuesday, December 6, 2011 9:13 AM

All replies

  • Hi Nick,

    during the nightly build I use the deployment framework (BTDF) for creating the packages on the build server. So my nightly build performs following steps:

    1. Build the SLN

    2. Unittest .NET components

    3. Unittest BizTalk components (maps, pipeline components)

    4. package the solution via BTDF

    from here you need to pick the package and install it to your integration testserver and start the BizUnit tests.

     

     

     



    Regards
    Daniel Saager
    http://www.appliedtechnologies.de dsaager@appliedtechnologies.de
    please mark the post accordingly :-)
    Tuesday, December 6, 2011 7:39 AM
  • Thanks for the reply Daniel, I'm going to take a look at BTDF today and see how I can incorporate it into my builds.

    N.


    Nick Heppleston - Independent UK BizTalk Consultant (http://www.modhul.com)

    Please mark as answered if this answers your question.

    Looking for a fast and efficient way to archive messages in BizTalk? Try Atomic-Scope's new BizTalk Message Archiving Pipeline Component. Download a free 14-day trial!

    Tuesday, December 6, 2011 9:00 AM
  • Nick,

    I have created a TFS 2010 WF xaml for Building the projects in the solution, then it calls a MSBuild project file in my solution, that deploys all the BizTalk artifacts into a BizTalk instance on my TFS build server, creates and MSI and then imports test bindings, starts everything and goes back to the TFS wf xaml to run any tests in the solution. If you are happy with the results, you can take the MSI to the next environment.

    I am working on a blog post around how this works, but it will be a couple more weeks before that is ready.


    Bill Chesnut | BizTalk Server MVP | Mexia Consulting | Melbourne Australia
    http://www.biztalkbill.com
    Please indicate "Mark as Answer" if this post has answered the question.
    Tuesday, December 6, 2011 9:13 AM
  • Thanks for the post Bill, I'm going to take a look at that approach today and see whether I can re-use my (quite extensive) MSBuild library for the deployment bits. I have found this blog post - http://geekswithblogs.net/jakob/archive/2010/05/05/executing-legacy-msbuild-scripts-in-tfs-2010-build.aspx - was that the approach you have taken?

    If not, maybe there are some WF activities that can be re-used from the Deployment Framework.

    I must say however that I do prefer the MSBuild approach, given that I don't need any specific tools to do the development (unlike WF) and I don't need to compile, deploy etc. to test.... 

    N.


    Nick Heppleston - Independent UK BizTalk Consultant (http://www.modhul.com)

    Please mark as answered if this answers your question.

    Looking for a fast and efficient way to archive messages in BizTalk? Try Atomic-Scope's new BizTalk Message Archiving Pipeline Component. Download a free 14-day trial!

    Tuesday, December 6, 2011 9:30 AM
  • Nick,

    What I did is openned the default xaml workflow and inserted a call to my MSBuild script between the project build and the test activities.

    I will try to get that part up on my website for you to look at tomorrow.


    Bill Chesnut | BizTalk Server MVP | Mexia Consulting | Melbourne Australia
    http://www.biztalkbill.com
    Please indicate "Mark as Answer" if this post has answered the question.
    Tuesday, December 6, 2011 12:01 PM
  • Cheers.

    Nick Heppleston - Independent UK BizTalk Consultant (http://www.modhul.com)

    Please mark as answered if this answers your question.

    Looking for a fast and efficient way to archive messages in BizTalk? Try Atomic-Scope's new BizTalk Message Archiving Pipeline Component. Download a free 14-day trial!

    Tuesday, December 6, 2011 12:06 PM
  • Not wanting to open this can of worms, but I'm experiencing a problem invoking BTSTask from an existing MSBuild script that in turn is being invoked by TFS 2010 build via a Build Service on a Windows Server 2008 box.

    The BTSTask command works fine when executed on the command prompt, fine when invoked from MSBuild at the command prompt, but not when invoked by the TFS 2010 Build Service. I am testing using the same user that is running the Build Service (albeit in an interactive manner, the Build Service is a Windows Service) and I have disabled UAC (User Access Control) as I thought that might be the culprit.....

    I am receiving the following error:

     

    EXEC : error : File "MyAssembly.dll" is not a valid Assembly. [C:\Builds\BTSBA\IMW\..\Trunk\Build\BizTalkApplication-GenericBuild.proj]

    Could not load file or assembly 'MyAssembly.dll' or one of its dependencies. The system cannot find the file specified.
     

    Command failed with 1 errors, 0 warnings.

     

    Although the error talks about dependencies, this assembly doesn't have any (other than the usual system deps) and I can't find any that would cause this problem - especially given that the assembly will deploy to BizTalk and the GAC without issue when I execute the BTSTask command from the command-line.

    Any help would be v.v.v.v.v appreciated

    Nick.


    Nick Heppleston - Independent UK BizTalk Consultant (http://www.modhul.com)

    Please mark as answered if this answers your question.

    Looking for a fast and efficient way to archive messages in BizTalk? Try Atomic-Scope's new BizTalk Message Archiving Pipeline Component. Download a free 14-day trial!

    Friday, December 9, 2011 12:20 PM
  • Nick,

    I have the 3 Artfiacts in a zip file on my website: BizTalk TFS Build Artifacts - http://www.biztalkbill.com/Downloads.aspx

    The 3 Files are:

    BizTalkBuildProcessTemplate.xaml - TFS Build Workflow

    BizTalkDeployment.proj - MSBuild Script to deploy BizTalk solution (at solution level of each solution)

    BizTalkDeployment.properties - Used by MSBuild Script to know what to deploy and where (at solution level of each solution)


    Bill Chesnut | BizTalk Server MVP | Mexia Consulting | Melbourne Australia
    http://www.biztalkbill.com
    Please indicate "Mark as Answer" if this post has answered the question.
    Friday, December 9, 2011 10:34 PM
  • Hi Nick,

    Of course I'm biased since the Deployment Framework for BizTalk is my project, but I'd challenge you to find many scenarios where it won't do the job quickly and easily.  The few things that aren't built in can be easily plugged in since it's all built upon MSBuild and has many extensibility points.  There's really no reason anymore to bother with assembling custom MSBuild scripts and tasks.  Please give it a thorough trial before you go back to a custom option.

    The upcoming final release of V5.0 allows you to drop a BTDF project right into Team Build with no modifications; just use the out-of-the-box XAML build template from Microsoft.

    The best way to install and deploy a BTDF MSI remotely on a server is with SysInternals PsExec.  There are a bunch of posts about this on the CodePlex site.

    Regards,
    Thomas F. Abraham
    Deployment Framework for BizTalk project site

    Tuesday, December 13, 2011 7:06 AM