Shobin Mathew Rotating Header Image

Complete Devops using TFS 2015 and Microsoft RM 2015

Hi Guys,
Just wanted to share some achievement with regards to DevOps in my engagement with one of our client. We were using a quiet good set of tools for Release Management, which I have never used before. First step was to learn those tools. Also learned the release process that was existing in their organisation. Along with my normal build and deployment activities, I was partially spending time on doing Proof of Concepts on different process improvements to the existing process and development methodology.

TFS was used as a source control system by our client and not used for build and deployment. Initially implemented the build system in TFS 2013 XAML build engine. Meanwhile Microsoft released TFS 2015 vNext build system and we urged for upgrade to TFS 2015. Once we got TFS upgraded to TFS 2015, I started playing around with TFS 2015 vNext build system and Release Management Server 2015.

Yesterday, I could successfully test the TFS 2015 and RM server integrated build and deployment through TEST, QA and UAT Servers, including the approval workflow processes. The pilot run was successful though I need to complete some activities in it. It was really awesome.

Workflow in vNext Build definition in TFS 2015.

  1. Build a visual studio solution.
  2. In case of build failure send notification to all those who has checked in after last success full build.
  3. Perform the unit testing.
  4. Publish the build artifacts to a UNC path or shared network.
  5. Trigger the RM Release for Test stage.(Re Usable code snippet for the same has been published in Reuse Platform. Search in Enterprise Architect focus Area)

Workflow in RM server

  1. Deploy the Application to Test Server.
  2. Validate the deployment.
  3. Approve the test stage of deployment.
  4. Deploy the Application to QA Server.
  5. Validate the QA deployment.
  6. Approve the QA stage of deployment
  7. Deploy the Application to UAT Server.
  8. Validate the UAT deployment.
  9. Approve the UAT stage of deployment

The Configurations in Release Management Server using RM client.
(Refer: Points to be noted before RM configuration)

  1. Configure/Create the environments
  2. Configure/Add the servers to RM.
  3. Create the Release Path for the APP.
  4. Create a component for Web Application that is to be deployed.
  5. Create the component for Coded UI.
  6. Create the power shell script for deployment.
  7. Create the power shell script for Coded UI. Must Read: The challenges.


I will update the site with more details soon

Coded UI Tests from vNext Release Templates in RM 2015

To have complete automated release process, we should have the coded UI tests as a part of Release and deployment. When we consider vNext release templates, we have to use power shell script to initiate and perform the coded UI test. I performed PoC with three command line tools.  I would like to summaries my findings here.

  1. TCM.exe: It needs Lab Management to be implemented. We need to assign a coded UI test to the testcases in MTM. We can then trigger automated test in MTM using the command line tool TCM.exe. The automated test will be trigerred but will be waiting for the Test controller.
  2. MStest.exe: This wont support vNext builds. I was able to successfully trigger the automated coded UI test but was unable to publish the results to TFS.
    The MSDN documentation of publishbuild option of this command line tool is has contradictions in two different pages. One page says build name has to be passed and another page says build id has to be passed. I tried both option, but failed. It says unable to find the build.
  3. Vstest.console.exe:The tfspublisher extension of this command line tool has a bug in TFS 2015 update 1, which will be fixed in VS2015 update 2. I was able to successfully run the coded UI tests, but unable to publish the results to TFS. While using vs2013 tool, it says build not found. While using vs2015 ultimate command line tool, it throws unhanded exception. Method not found from tfslogger.

Challenges faced with RM configuration

  1. Winrm should be configured and remoting should be enabled.
    Enable-PSRemoting -Force
    winrm quickconfig -transport:http
  2. Environment should be created first. Then create servers from within environment. The winrm port should be mentioned in the DNS name of the server.
  3. The servers should be in trusted domain.