6

Próbuję użyć zespoły jak to w projekcie VS2012:Coded testy UI - nie można rozwiązać symbol UITesting

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

Jednak mam kilka czerwonych w moich testów:

enter image description here

Mogę zbudować i uruchomić lokalnie, nawet z tym czerwonym, ale chciałbym, aby to rozwiązanie rozwiązało, jeśli to możliwe. Moja maszyna do kompilacji odrzuca to z następującymi błędami:

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

Jakieś wskazówki? Wszystkie odniesienia w moim projekcie testowym są ustawione na kopiowanie local = true.

AKTUALIZACJA - Mam odniesienia działa lokalnie, dodając odniesienie do visualStudio.TestTools.UITesting, ale atrybut CodedUITest jest nadal czerwony i kompilacja nadal kończy się niepowodzeniem z tymi samymi błędami.

+3

Czy używasz VS2012 Ultimate lub VS2012 Premium? Kodowany interfejs użytkownika działa tylko na tych IDE. – neoscribe

Odpowiedz

7

Trzeba dodać odwołanie do: Microsoft.VisualStudio.QualityTools.CodedUITestFramework

+2

Dokładnie tego, czego szukałem, przestrzeń nazw w atrybucie jest myląca :) – squirrel

+0

dziękuję, działało!)) – BMaximus

7

Trzeba dodać referencje takich jak w poniższym załączniku:

enter image description here

+2

Potrzebowałem dodać wszystkie referencje zidentyfikowane tutaj, więc jest to przydatna informacja. Dzięki –

+5

wtf nie są one dodawane automatycznie podczas tworzenia projektu !!! –

0

W VS2017 musiałem użyć Visual Studio Installer, aby zainstalować składnik "Test kodowanego interfejsu użytkownika" na moim serwerze kompilacji. Można go znaleźć na karcie "Poszczególne komponenty" w sekcji "Debugowanie i testowanie".

Powiązane problemy