I can successfully run unit tests by passing file names separated by space. e.g.
>vstest.console.exe a.dll b.dll
But when I use PS script to do something like
> $TestDlls = Get-ChildItem -Path "Folder" -Filter "Test.*.dll" -Recurse -File
> $JoinedPath = $TestDlls -join " " #Try to join the paths by ' ' ??? Is it a wrong command?
> vstest.console.exe $JoinedPath
I got something unexpected...
Since $JoinedPath is a string with quotations like "a.dll b.dll"
So the vstest.console.exe will always receive a single "a.dll" (vstest.console.exe "a.dll b.dll")
I don't know how to express my problem precisely...
In short, I want to use powershell to simulate the command
vstest.console.exe a.dll b.dll
NOT
vstest.console.exe "a.dll b.dll"
I'm new to PowerShell I don't know if it is possible.