Running Typemock with VSTests Task

To run using SmartRunner see here: Run Tests on Azure DevOps CI using SmartRunner

The Typemock and VSTests will integrate VSTests with Typemock.

As Typemock via Visual Studio Tests requires typemock to be deployed it requires Administrative permissions and can only run on On Premesis Agents.

Using Typemock with VSTests Task

SmartRunner Task is normally used as direct replacement for the VSTest task. It has similar execution and reporting options options:

Execution Options

Test Assembly

Specifies the binaries to run tests on. Wildcards can be used.

Test Names

Additional criteria to filter tests from Test Assemblies. It operates on the "contains" principle.

For example, for "MyTest" criteria all tests from "MyTestsNamespace" namespace will run, as well as all tests from "MyTestClass" class and test method named "MyTest".

Run Settings Files

Path to runsetiings file to use with the tests.

Override TestRun Parameters

Override parameters defined in the TestRunParameters section of eunsettings file.

Code Coverage Enabled

Enable to see your code coverage

Setup Typemock Options

Following options are used to set the Typemock Integration.

Typemock

Enable AutoDeploy

Enables deploying Typemock on the agent machine

Requires Build Agent to have administrative permissions

Company

Name of the company this instance of Typemock is licensed to

Key

License key

Log Mocking Diagnostics

To enable all mocking logs, which you can find as the build artifacts.

If AutoDeploy is disabled Typemock Server should be installed on the build agent's machine.


Follow the Best Practices to configure Typemock references correctly for your test project. This is crucial in any case with and without AutoDeploy enabled.

Once this configured this task will run MsTests with Typemock Isolator.