2016-04-21 7 views
0

PowershellのInvoke-Commandを使用してVSTest.Console.exe経由でテストを開始しようとしています。私は「-Credential $資格情報を削除した場合に気づいたPowershellのInvoke-Commandを介したVSTest.Console.exeテストの実行

Error: Failed to initialize client proxy: could not connect to test process . 
+ CategoryInfo   : NotSpecified: (Error: Failed t... test process .:String) [], RemoteException 
+ FullyQualifiedErrorId : NativeCommandError 
+ PSComputerName  : 10.123.123.12 

Error: There was no endpoint listening at net.pipe://mymachineFQDN/TestExecutor/5208 that could accept the message. This is often caused by an incorrect address or SOAP action. See 
InnerException, if present, for more details. 

:私はPowerShellのにかなり新しいですが、スクリプトは次のようになります。これが返された60秒後

$secpasswd = ConvertTo-SecureString “[email protected]” -AsPlainText -Force 
$credentials = New-Object System.Management.Automation.PSCredential (“administrator”, $secpasswd) 
$shareName = "testruns" 

#Script block to execute on the remote machine 
$scriptBlock = { 
param($shareName, $testRunId, $myTestContainers, $testCategory) 
$localFolder = "c:\$shareName\" + $testRunId 
$exePath = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" 

$argList = @() 
#Add the containers 
$myTestContainers.Split(",") | foreach { 
    $argList += "`"$localFolder\$_`" " 
} 

$argList += "/logger:trx" 
$argList += "/settings:$localFolder\remote.testsettings" 
$argList += "/Platform:x64" 
$argList += "/Framework:Framework45" 

#Let everyone know whats happening 
Write-Output "Args: $argList" 

#Do it 
& $exePath $argList 
} 

#Invoke the script block 
Invoke-Command -ScriptBlock $scriptBlock -Credential $credentials -ComputerName 10.123.123.12 -ArgumentList testruns, "1.2.3456", "CaiConTest.dll,CsiConTest.dll", "" 

"私がコマンドを実行しているのと同じマシン上で実行すると、実行され、テスト結果が正常に返されます。私はここで何が欠けていますか?

答えて

1

私はこのすべてを間違って見ていました。この演習の目的は、TeamCityメタナーを使用してテストを実行することでした。実際にはVisual Studio Testsのランナーが用意されています。重い持ち上げを行うことができます。ちょうど戻って、それを新鮮な目で見る必要があった!

関連する問題