MSBuild is the build system for Microsoft and Visual Studio.
It is completely transparent in processing and building software,
enabling developers to build products in development environments where Visual Studio
is not present.
MSBuild uses a simple and extensible XML file format that is fully supported by Microsoft.
It enables developers to fully describe what items
need to be built and how they need to be built in different configurations.
This topic demonstrates how to integrate Telerik JustMock with a MSBuild task
MS Build tasks are units of executable code to perform build operations.
Once created, tasks can be shared among different developers to be reused in different projects.
To learn more about MSBuild refer to
How to run your unit tests from a MSBuild task
Open your MSBuild project and under the Project node include Telerik JustMock targets file. This file is named JustMock.targets and can be found
in the installation directory under the Libraries folder (by default
<Import Project="C:\Program Files (x86)\Telerik\JustMock\Libraries\JustMock.targets" />
|Remember to change the targets file path to the one specific for you system.|
Add the following two tasks under the Project node to start and stop Telerik JustMock respectively before and after the tests run:
You can optionally link (or unlink) 3rd-party profilers:
<JustMockStart LinkProfilers="JustTrace; Visual Studio 2012 Code Coverage/IntelliTrace" />
<JustMockStop UnlinkProfilers="JustTrace; Visual Studio 2012 Code Coverage/IntelliTrace"/>
Multiple profilers can be specified by separating them with a semicolon. The names of the profilers must be specified
exactly as they appear in the UI of the JustMock configuration tool. The files Telerik.JustMock.Configuration.exe
and Telerik.JustMock.Configuration.exe.config must be present in the same folder as Telerik.JustMock.MSBuild.dll.