Using Typemock Tasks in your Custom Template

To integrate Typemock Isolator with Team Foundation Server using a custom template, you need to add Typemock Isolator’s tasks to the template file and define parameters of these tasks, if necessary.


This is the final step of integrating Typemock with TFS, make sure that you've got all the prerequisites prepared: TFS 2012, TFS2013 or TFS2015.


Typemock Isolator provides the following tasks:

To add Typemock tasks to your custom template:

  1. Open your template in the designer.

  2. Scroll down to "Compile, Test and Publish" sequence.

  3. Locate "Run VS Test Runner" task.

  4. Locate Typemock tasks in the Toolbox window under "General" category.

  5. Drag a TryCatch control from the Toolbox and drop it after the "Run VS Test Runner" task.

  6. Drag a TypemockRegister task from the Toolbox and drop it before the TryCatch control.

  7. Drag a TypemockStart task from the Toolbox and drop it inside the try block in TryCatch control.

  8. Drag a "Run VS Test Runner" control from the "Compile, Test and Publish" sequence and drop it inside the try block in TryCatch control after TypemockStart.

  9. Click on "Finally" in the TryCatch control, after it's expended, drop inside TypemockStop task.

To Configuring the your custom template with Typemock tasks:

  1. Open your template in the designer.

  2. Right click on TypeMockRegister task and select "Properties"

  3. In the properties view fill in Typemock license details

 

To Deploy Isolator automatically on the build agent:

1. Find the AutoDeploy folder's Source Location in Source Control Explorer.

2.  Copy the value of the Source location.

3.  In the TypeMockRegister properties, set the AutoDeployDir property to the Source location.