1
votes

We have come across an issue where TFS build fails to trigger coded UI tests, based on how the Test Settings file is specified in the build definition.

We have been unable to get CodedUI test project to run. The goal is to have it run on a separate machine (virtual machine). We have configured the test controller and agent on the VM. We have also set it to run as interactive process. When we run build it partially succeeds and the following test error is reported

The failure message returned is as below:

MsTestAdapter failed to discover tests in class ‘MVC_Test.MVCTest_CUI’ of assembly ‘C:\Builds\1\Test_COE\MVCAppFramework\bin\MVC_Test.dll’. Reason Could not load file or assembly ‘Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=12.0.0.0. Culture =neutral, PublickeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified..

Setup / Environment Details:

Visual studio 2015 ultimate

TFS server 2015

Agents for Visual studio 2015(Test Controller and Test Agents)

Test agent is installed as interactive process for Coded UI tests

2

2 Answers

1
votes

Your CodedUI tests were written in the 2013 version of VS. I believe you have two options:

  1. Install the Agents for Visual Studio 2013 on your test agent
  2. Use binding redirects to automatically use the newer version as described in this TFS 2010 to 2015 Upgrade: CodedUI Feature Test Builds blog post

UPDATE

  1. You could try upgrading your CodedUI DLLS to the VS2015 versions (14.0.0.0).
0
votes

It cannot find the dll libraries for Version 12.0 which provided by VS2013. Install VS2013 on the test agent and then retry.