teamcity - Executing VSTest.Console.exe test via Powershell Invoke-Command -
so i'm trying kick off test runs via vstest.console.exe using powershell's invoke-command. i'm pretty new powershell, script looks this:
$secpasswd = convertto-securestring “p@ssword01” -asplaintext -force $credentials = new-object system.management.automation.pscredential (“administrator”, $secpasswd) $sharename = "testruns" #script block execute on 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 containers $mytestcontainers.split(",") | foreach { $arglist += "`"$localfolder\$_`" " } $arglist += "/logger:trx" $arglist += "/settings:$localfolder\remote.testsettings" $arglist += "/platform:x64" $arglist += "/framework:framework45" #let know whats happening write-output "args: $arglist" #do & $exepath $arglist } #invoke script block invoke-command -scriptblock $scriptblock -credential $credentials -computername 10.123.123.12 -argumentlist testruns, "1.2.3456", "caicontest.dll,csicontest.dll", ""
after 60 seconds returned:
error: failed initialize client proxy: not connect test process . + categoryinfo : notspecified: (error: failed t... test process .:string) [], remoteexception + fullyqualifiederrorid : nativecommanderror + pscomputername : 10.123.123.12 error: there no endpoint listening @ net.pipe://mymachinefqdn/testexecutor/5208 accept message. caused incorrect address or soap action. see innerexception, if present, more details.
i've noticed if remove "-credential $credentials" , run on same machine i'm invoking command on, runs , test results fine. might missing here?
ok, had been looking @ wrong. purpose of exercise use teamcity metarunner run tests. there's visual studio tests runner available can heavy lifting instead. needed step , @ fresh eyes!
Comments
Post a Comment