2016-08-18 2 views
0

sqllocaldb 인스턴스에서 실행되는 몇 가지 테스트가 있습니다. Teamcity CI 서버가 같은 PC에 있습니다 (이유를 묻지 마십시오). 하지만 TeamCity에서 테스트를 실행하면이 오류가 발생합니다.Teamcity 및 localdb

OneTimeSetUp: System.Data.SqlClient.SqlException : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. The specified LocalDB instance does not exist.

VS에서 테스트를 실행하는 것은 괜찮습니다. TeamCity에서이 localDB 항목을 볼 수없는 이유는 무엇입니까?

+0

TeamCity는 "서비스"로 실행됩니까? 서비스가 "로컬 시스템", "네트워크 서비스"또는 일부 유틸리티 계정으로 실행 중입니까? – tgolisch

+0

TeamCIty가 서비스 '로컬 시스템'으로 실행 중입니다. 기본 설정, 여전히 해결 방법을 찾았습니다. –

답변

0

이 경우에는 명령 프롬프트 러너에서 nunit-console을 시작했습니다. TeamCity는 결과 출력을 포착하고 localDB 인스턴스에 올바르게 연결하여 실패/성공 테스트를 표시합니다.