2014-07-23 5 views
8

Teamcity를 사용하는 VM에서 WPF 애플리케이션 (코드화 된 UI 테스트)을 테스트하기 위해 MSTest를 실행합니다. 난 이미 대화 형 프로세스와 테스트 에이전트를 설치하지만 난Teamcity 코드화 된 UI 테스트

Error calling Initialization method for test class Squarebit.Apms.Terminal.Wpf.Test.CodedUITest1: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: To run tests that interact with the desktop, you must set up the test agent to run as an interactive process. For more information, see "How to: Set Up Your Test Agent to Run Tests That Interact with the Desktop" (http://go.microsoft.com/fwlink/?LinkId=255012) 
If you are running the tests as part of your team build, you must also set up the build agent to run as an interactive process. For more information, see "How to: Configure and Run Scheduled Tests After Building Your Application" (http://go.microsoft.com/fwlink/?LinkId=254735) 
    at Microsoft.VisualStudio.TestTools.UITesting.Playback.Initialize() 
    at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestExtensionExecution.BeforeTestInitialize(Object sender, BeforeTestInitializeEventArgs e) 
    at Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecution.RaiseBeforeTestInitialize(BeforeTestInitializeEventArgs args) 
    at Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecuter.RunInitializeMethod() 

당신이 날이 문제를 해결하거나 인 TeamCity를 사용하여 코딩 된 UI 테스트를 실행하는 몇 가지 방법을 추천 도와 드릴까요 인 TeamCity 로그에서이 오류가 계속?

+3

데스크톱 창 API 세트에 액세스해야하므로 서비스 계정에서 CUIT 테스트를 실행할 수 없습니다. Teamcity Agent를 서비스가 아닌 계정으로 설정하려면 http://jake.ginnivan.net/teamcity-ui-test-agent/의 "teamcity 빌드 에이전트 설치"섹션을 참조하십시오. –

+0

Arun 고맙습니다. 작동합니다. – Gintama

+0

@ArunM - Gintama가 정답으로 표시 할 수 있도록 답변으로 의견을 복사해야합니다. –

답변

7

코딩 된 UI 테스트 (CUIT)는 데스크톱 창 API 세트에 대한 액세스가 필요하기 때문에 서비스 계정에서 실행할 수 없습니다.

http://jake.ginnivan.net/teamcity-ui-test-agent/Installing the teamcity build agent 섹션을 참조하여 비 서비스 계정으로 teamcity 에이전트를 설정하십시오.

+0

TC로 이동하기 전에 비슷한 작업을하려고합니다. 원격으로 실행되는 간단한 배치 스크립트를 사용하여 작동시키고 싶습니다. 로컬에서 잘 실행되고 CUIT가 예상대로 통과합니다. 원격으로 실행하려고하면 실패합니다. 인터랙티브 프로세스를 아직 보지 못했다. – IbrarMumtaz

관련 문제