The following is the recommended way to install Typemock Isolator on your build server\agents.
Auto-Deploy mode enables you to run tests with Isolator on machines where Typemock Isolator is not installed. A temporary local Typemock installation is deployed on the agent, which allows running Typemock tests. The environment can be restored afterwards.
There is no need to update agents when you upgrade Isolator's version.
The agents can work side-by-side on multiple solutions Referencing various Typemock Isolator versions without clashing.
The build process must have administrative privileges.
To Use Auto-Deploy
To Create a Typemock environment on the build machine.
1. Create a 'Typemock' folder in your source repository.
2. Copy AutoDeploy directory from "<Typemock installation folder>\BuildScripts\" to "<repository>\Typemock\"
3. "<Typemock installation folder>\BuildScripts\" contains integration tasks for various build scripts and DLLs required to run those tasks.
Team Foundation Server:
Team Foundation Server 2010
Team Foundation Server 2012
Team Foundation Server 2013
Team Foundation Server 2015
TmockRunner - Typemock command line tool
Select the activity that suites your build and copy its content to "<repository>\Typemock\AutoDeploy\"
4. In your build script, run the TypemockRegister task from the source
control repository with the AutoDeploy option set to true.
See the exact syntax of each build script in Server-Side Integration Book.
To use auto deploy you must follow Typemock References Best Practice.
Example of multiple versions of Typemock, AutoDeployed with MsBuild Task
A repository might look like this when 3 projects use 3 versions of Typemock.
TestProject1 tests Project1 using Typemock Isolator version 6.2.2.
TestProject2 tests Project2 using Typemock Isolator version 7.5.3.
TestProject3 tests Project3 using Typemock Isolator version 8.0.6.
In this case, Isolator installation (AutoDeploy folder) must be version 8.0.6 or higher.
The content of AutoDeploy folder when with MSBuild:
The outlined files were copied from <Typemock installation folder>\BuildScripts\MSBuild".
Enabling AutoDeploy using TypemockRegister task in MSBuild:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <TypeMockLocation>C:\Repository\Dependencies\Typemock\AutoDeploy</TypeMockLocation> </PropertyGroup> <Import Project ="$(TypeMockLocation)\TypeMock.MSBuild.Tasks"/> <Target Name="RegisterTypeMock"> <TypeMockRegister Company ="TypeMock" License ="XXXX-XXXX-XXXX-XXXX" AutoDeploy="True" /> </Target> </Project>
How Multiple Versions of Typemock can work Side By Side
Typemock Isolator is backward compatible with older Isolator versions.
For example, when Isolator version 8 is installed, you can run tests that reference Isolator version 7 assemblies (Typemock.dll and TypemockArrangeActAssert.dll).
However, when you have Isolator version 7 installed, you cannot run tests that reference Isolator version 8.
This means that if you manually install Isolator, you need to verify that a newer version of Typemock Isolator is not already installed.
Otherwise, when you attempt to use an older Isolator version to run tests created with a newer version, your tests will fail.
Auto-Deploy mode ensures that only the latest version is installed, so if there are multiple Isolator versions on one server, they will never conflict with each other.
In order to understand how to reference Typemock's DLLs see Best Practice.