You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the newest release of VSTest I can no long pass in test run parameters.
This hack working a week ago: dotnet vstest tests.dll --TestCaseFilter:TestCategory=Smoke --Settings:Parallel.RunSettings -- TestRunParameters/Parameter[contains(@name,'Browser')]/@value="Chrome"
So now I get the following error:
The test run parameter argument 'TestRunParameters.Parameter(name=Browser,' is invalid. Please use the format below.
Format: TestRunParameters.Parameter(name="", value="")
Given the error I should be able to do this instead: dotnet vstest tests.dll --TestCaseFilter:TestCategory=Smoke --Settings:Parallel.RunSettings -- TestRunParameters.Parameter(name="Browser",value="Chrome")
but I still get the same parameter argument error.
Note* This is almost certainly related to @singhsarab changes in #2251
Steps to reproduce
Create a simple test
Run dotnet vstest tests.dll -- TestRunParameters.Parameter(name="Browser",value="Chrome")
or "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" vstest tests.dll -- TestRunParameters.Parameter(name="Browser",value="Chrome")
Note the error VSTest returns
Expected behavior
There would be some way pass in test run parameters
Actual behavior
No matter what I do I get the following error:
The test run parameter argument 'TestRunParameters.Parameter(name=Browser,' is invalid. Please use the format below.
Format: TestRunParameters.Parameter(name="", value="")
@TroyWalshProf please see #862 (comment) for some workarounds and explanation. You will need to do some escaping, which will also depend on whether you run the commands from cmd or powershell. Because vstest does not route via msbuild you should be able to escape it like this, and in the same way for vstest.console.
Description
With the newest release of VSTest I can no long pass in test run parameters.
This hack working a week ago:
dotnet vstest tests.dll --TestCaseFilter:TestCategory=Smoke --Settings:Parallel.RunSettings -- TestRunParameters/Parameter[contains(@name,'Browser')]/@value="Chrome"
So now I get the following error:
Given the error I should be able to do this instead:
dotnet vstest tests.dll --TestCaseFilter:TestCategory=Smoke --Settings:Parallel.RunSettings -- TestRunParameters.Parameter(name="Browser",value="Chrome")
but I still get the same parameter argument error.
Note* This is almost certainly related to @singhsarab changes in #2251
Steps to reproduce
dotnet vstest tests.dll -- TestRunParameters.Parameter(name="Browser",value="Chrome")
or
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" vstest tests.dll -- TestRunParameters.Parameter(name="Browser",value="Chrome")
Expected behavior
There would be some way pass in test run parameters
Actual behavior
No matter what I do I get the following error:
Diagnostic logs
See: https://github.com/TroyWalshProf/ActionsSample/runs/539569841?check_suite_focus=true
Environment
The text was updated successfully, but these errors were encountered: