Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long response files don't work with dotnet test & dotnet vstest #3513

Closed
nohwnd opened this issue Mar 24, 2022 · 2 comments
Closed

Long response files don't work with dotnet test & dotnet vstest #3513

nohwnd opened this issue Mar 24, 2022 · 2 comments

Comments

@nohwnd
Copy link
Member

nohwnd commented Mar 24, 2022

vstest.console can take a response file that is used to provide parameters to vstest.console.exe when the parameters become larger than the command line limit of 32k characters, for example when there is a huge test filter or a lot of dlls with long paths.

vstest.console is able to consume that file just fine, but:

  • dotnet test, fails to see that this is a dotnet test + dll run, and fails to run.
  • dotnet vstest expands the file and tries to relay to vstest.console using command line, hitting the same 32k command limit the response file was trying to avoid.

Example (obviously make the filter much longer, or provide way more dlls, even copies of the same dll name are fine):


C:\t\mstest46\bin\Debug\net7.0\mstest46.dll  C:\t\mstest47\bin\Debug\net7.0\mstest47.dll /TestCaseFilter:"FullyQualifiedName=mstest46.UnitTest1.TestMethod1|FullyQualifiedName=mstest46.UnitTest1.TestMethod2"

Call from powershell (escaping the @ to avoid splatting): & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" `@parameters.rsp
Or from cmd: "C:\Program Files\Microsoft Visual Studio\2022\ Enterprise \Common7\IDE\Extensions\TestPlatform\vstest.console.exe" @parameters.rsp

@nohwnd
Copy link
Member Author

nohwnd commented Mar 24, 2022

I did not see bugs reported around this, so either the functionality is rarely used, or not used via dotnet test & vstest. But is for sure used by CloudBuild via vstest.console.

@nohwnd
Copy link
Member Author

nohwnd commented Jul 8, 2024

This would require architectural changes to vstest, and won't be implemented, we are focusing on adding new features to Testing.Platform instead. https://aka.ms/testingplatform

@nohwnd nohwnd closed this as not planned Won't fix, can't repro, duplicate, stale Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant