Perform Deployment between BTDF Build & Automated Test Process

Topics: Server Deployment, Tips and Tricks
May 27, 2013 at 5:52 AM
Hi Tom

Greetings!!
I have been using BTDF and its going fine. I have written automated test cases for BizTalk Application using BizUnit and have integrated in the TFS Build Definition. I have a test case where i have to test the output file for a BizTalk application in the OUT folder. This can be tested only after deployment and as a result this particular test case does not make any sense if i run it after the Build. So, i just wanted to know is there a way i can write some commands for deploy in the BTDFDefault process template after the MS Build Process and before the MS Tests. I actually tried adding the code but the MSI gets reflected only after the entire process is completed. ANy other alternative??
Coordinator
May 29, 2013 at 4:58 PM
Hi,

The default build template (BTDFDefault differs from DefaultTemplate in just one place) runs tests before "passing" the build and copying the output to the drop folder. If you wanted to deploy the BizTalk app mid-build you could add steps to the workflow just after the build step to run a local or remote deployment. Your question is more about build template customization than BTDF, so I won't go into detail here. I'll just say that it is definitely possible -- with WF you can do pretty much anything if you're willing to dive in and customize the template.

Thanks,
Tom
May 30, 2013 at 1:24 PM
Hi Tom

I have done the same thing as you've told. I have modified the BTDFDefault template by adding the deploy code after "Check-In Gated Changes for Check-In Shelveset Builds" box and before "If not Disable Tests" box. The deploy code bascially calls a PS script file which in turn looks for the MSI from the same drop location which is given in the Build definition. To my surprise i found that, till the entire process flow is executed the MSI file doesnt get reflected in the drop location and as a result the mid-build deployment is not happening. Kindly let me know how to proceed.

Thanks
Keshav
Coordinator
Jun 17, 2013 at 6:22 AM
Hi Keshav,

Maybe it is related to the fact that two projects are being built (BizTalk sln and .btdfproj), and there is at least one loop within the build template to handle that. You'd probably have to turn on more detailed logging on your build and try to determine exactly at what point your script is being run in the overall context of the two builds.

Tom