powershell - Publishing results in NUnit tests -


i writing powershell script multithreading nunit tests. problem take test categories file category.txt, , have write categories have been done output file file 1.txt. need output xml report after tests have been performed. how can in nunit?

$groups=get-content d:\test\category.txt | select-object -last 10 write-host $groups if ($groups -ne $null)     {write-host "true"}  else      {write-host "false"} ###multithreading### $threadnumber =$groups.count $scriptblock = {     function nunit {         $connection = @{"server" = ""; "username" = ""; "password" = ""}         write-verbose $connection         $serv = $connection.get_item("server")         $user = $connection.get_item("username")         $pass = $connection.get_item("password")          $securepassword = convertto-securestring -asplaintext $pass -force         #create connection credentials object invoke-command         $cred   = new-object -typename system.management.automation.pscredential -argumentlist $user, $securepassword         $output = "c:\"         $scriptblock = {             cmd.exe /c "c:\testnunit\bin\nunit-console.exe /xml:c:\console-test.xml c:\testnunit\dll\tests.dll /include:testtypesmoke> c:\1.txt"          }         invoke-command -computername $serv -scriptblock  $scriptblock -credential $cred     }     nunit } 

i try on nunit after trying things @ end, suggestion try powershell workflow multi-threading. work functions.

    workflow nunit     {         param         (             $server,             $username,             $password,                       )                  foreach -parallel -throttlelimit 2($group in $groups)                 try{                     //nunit code here                 }             }             catch             {                $_.exception.message             }            }     }     nunit-server "" -username "" -password "" 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -