6

Я пытаюсь использовать сборки, как это в проекте VS2012:Кодовые тесты UI - не может разрешить символ UITesting

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

Однако я получаю кучу красного в моих тестах:

enter image description here

Я могу создавать и запускать локально даже с этим красным цветом, но, если это возможно, я хотел бы получить этот материал. Мой сборщик отклоняет это со следующими ошибками:

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?) 

Любые советы? Все ссылки в моем тестовом проекте настроены на копирование local = true.

UPDATE - Я получил ссылки, работающие локально, добавив ссылку на visualStudio.TestTools.UITesting, но атрибут CodedUITest по-прежнему остается красным, а сборка по-прежнему терпит неудачу с теми же ошибками.

+3

Вы используете VS2012 Ultimate или VS2012 Premium? Кодированный интерфейс работает только с этими IDE. – neoscribe

ответ

7

Вы должны добавить ссылку: Microsoft.VisualStudio.QualityTools.CodedUITestFramework

+2

Точно то, что я искал, пространство имен по атрибуту вводит в заблуждение :) – squirrel

+0

спасибо, сработал!)) – BMaximus

7

Вам нужно добавить ссылки, например, в следующем приложении:

enter image description here

+2

Мне нужно было добавить все ссылки, указанные здесь, чтобы это была полезная информация. Спасибо –

+5

wtf arent, которые автоматически добавляются при создании проекта !!! –

0

В VS2017 я должен был использовать установщик Visual Studio для установки компонента «Coded UI Test» на моем сервере сборки. Он находится на вкладке «Отдельные компоненты» в разделе «Отладка и тестирование».

Смежные вопросы