2014-10-31 3 views
0

Teamcity 에이전트에서 xunit과의 통합 테스트를 수행하는 CI 프로세스의 일부로 컴퓨팅 에뮬레이터를 실행하는 데 문제가 있습니다. 다음 코드를 사용하여 Xunit 테스트를 실행하는 동안 에뮬레이터를 시작하고 인스턴스를 배포합니다.TeamCity Agent에서 Azure Compute Emulator 실행

ExecuteCsrunWith(serviceDirectory + " " + configurationFile); 

    private ProcessExecutionResult ExecuteCsrunWith(string argument) 
    { 
     var result = new ProcessExecutionResult(); 
     using (var process = new Process()) 
     { 
      process.StartInfo = new ProcessStartInfo(PathToCsrun, argument) 
      { 
       UseShellExecute = false, 
       RedirectStandardOutput = true, 
       RedirectStandardError = true 
      }; 
      process.Start(); 
      result.Output = process.StandardOutput.ReadToEnd(); 
      result.Error = process.StandardError.ReadToEnd(); 
      process.WaitForExit(); 
      Log(result.Output); 
      Log(result.Error); 
     } 
     return result; 
    } 

시험은 작동하지 않습니다와 나는 이벤트 로그에이 오류가 있습니다

응용 프로그램 : v4.0.30319 설명 : : 프로세스가로 인해 종료 된 프레임 워크 버전 csmonitor.exe 처리되지 않은 예외. 예외 정보 : System.InvalidOperationException 스택 : at System.Windows.Forms.MessageBox.ShowCore (System.Windows.Forms.IWin32Window, System.String, System.String, System.Windows.Forms.MessageBoxButtons, System.Windows. System.Windows.Forms.MessageBoxDefaultButton (System.Windows.Forms.MessageBoxOptions, Boolean) 에서 System.Windows.Forms.MessageBox.Show (System.String, System.String, System.Windows.Forms.MessageBoxButtons,

012,351,641 : System.Windows.Forms.MessageBoxIcon) Microsoft.ServiceHosting.Tools.CloudServicesMonitor.Program.Main에서 는 (선택 System.String [])

얹는

오류있는 응용 프로그램 이름 : csmonitor.exe 버전 : 2.4.6489.1, 타임 스탬프 : 0x53bdc3cc 오류있는 모듈 이름 : KERNELBASE.dll 버전 : 6.2.9200.16864, 타임 스탬프 : 0x531d34d8 예외 코드 : 0xe0434352 오류 오프셋 : 0x0000000000047b8c 오류있는 프로세스 ID : 0x01cff4c9c18a8431 오류있는 응용 프로그램 경로 : C : \ 프로그램 파일 \은 Microsoft SDKs \ 푸른 \ 에뮬레이터 \ 오류있는 모듈 경로 csmonitor.exe : C : \ WINDOWS \ system32를 \ KERNELBASE.dll 0xe98 오류있는 응용 프로그램 시작 시간 보고 ID : 2321e30b-60bd-11e4-9406-00155dfd9db8 오류있는 패키지 전체 이름 : 오류가있는 패키지 상대 응용 프로그램 ID :

은 내가 리디렉션 출력을 읽을 필요가 있기 때문에 인 UseShellExecute = 거짓를 사용해야합니다.

답변

0

문제는 Teamcity Agent가 (로컬 시스템) 계정으로 실행되고있었습니다. csrun.exe 프로세스가 (로컬 시스템) 계정을 사용하여 시작될 때 compute emulator에 문제가있는 것으로 보입니다.

수정 사항 : Teamcity Agent (Windows 서비스)를 변경하여 사용자 정의 (빌드 마스터) 계정을 사용하고 모든 것이 예상대로 작동합니다.

관련 문제