Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Coded UI tests - cannot resolve symbol UITesting

I'm trying to use the assemblies like this in a VS2012 project:

using Microsoft.VisualStudio.TestTools.UITesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UITest.Extension;

However I get a bunch of red in my tests:

enter image description here

I can build and run locally even with this red, but I'd like to get this stuff resolving if possible. My build machine rejects this with the following errors:

 DashboardTest.cs (7): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
 DashboardTest.cs (9): The type or namespace name 'UITest' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
 UIMap.cs (9): The type or namespace name 'UITest' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
 UIMap.cs (10): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
 UIMap.Designer.cs (19): The type or namespace name 'UITest' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
 UIMap.Designer.cs (20): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
 UIMap.Designer.cs (132): The type or namespace name 'BrowserWindow' could not be found (are you missing a using directive or an assembly reference?)
 DashboardTest.cs (10): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
 UIMap.cs (12): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
 UIMap.cs (13): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
 UIMap.Designer.cs (22): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
 UIMap.Designer.cs (23): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
 DashboardTest.cs (18): The type or namespace name 'CodedUITest' could not be found (are you missing a using directive or an assembly reference?)
 DashboardTest.cs (18): The type or namespace name 'CodedUITestAttribute' could not be found (are you missing a using directive or an assembly reference?)

Any tips? All references in my test project are set to copy local = true.

UPDATE - I got the references working locally by adding a reference to visualStudio.TestTools.UITesting, but the CodedUITest attribute is still red and the build still fails with the same errors.

like image 220
RobVious Avatar asked May 20 '13 15:05

RobVious


People also ask

Is coded UI deprecated?

Microsoft decided to deprecate Coded UI because the open-source UI testing tools such as Selenium and Appium have gained momentum in recent years, have a strong community backing, and are now pretty much industry standards.

When was coded UI deprecated?

Visual Studio 2019 is the last version with support for Coded UI.

Is coded UI open source?

Coded UI from Microsoft and open source White from TestStack are two popular choices for developers starting with automating UI tests for WPF applications. Coded UI is shipped with Visual Studio starting from version 2010. White is an open source project, you can find it here. It's also available as a NuGet package.


1 Answers

You need to add references such as in the following attachment:

enter image description here

like image 111
Ihor Pavlyk Avatar answered Nov 14 '22 03:11

Ihor Pavlyk