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

VsTest Console - TestCaseFilter via filter file #1532

Closed
bastianbrinkmann opened this issue Apr 6, 2018 · 3 comments
Closed

VsTest Console - TestCaseFilter via filter file #1532

bastianbrinkmann opened this issue Apr 6, 2018 · 3 comments

Comments

@bastianbrinkmann
Copy link

Description

The filtering of testcases can only be performed directly in the command line (https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md).
In my use case scenario, I need to filter individual test cases by FullyQualifiedName causing the arguments to get too long for the command line (> 32,767 characters).

It would be beneficial if it would be possible to pass the test filter via a file.

Steps to reproduce

Build a Filter that is too long for the commandline
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
/TestCaseFilter:"FullyQualifiedName=MainProject.Test.StringHelperTest.Concat_BothNotNull|FullyQualifiedName=MainProject.Test.StringHelperTest.Add_OnlyPositives|....

Expected behavior

Passing the TestCaseFilter via a filter file

Actual behavior

vstest.console not executable with such a long argument

@smadala
Copy link
Contributor

smadala commented Jun 23, 2018

@bastianbrinkmann VSTest.console accepts response file. Can you try it?

Example command: vstest.console.exe @filewithlenghtycommands.rsp

@smadala smadala closed this as completed Aug 9, 2018
@AutomationTester01
Copy link

I am having the same issue with my project.
Is there some way out for this?

@nohwnd
Copy link
Member

nohwnd commented Mar 25, 2022

There is an option in runsettings: #2273 (comment)

Another option is using response files. They currently don't work with dotnet test and dotnet vstest, but work just fine for vstest.console. Tracking that bug here: #3513

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

5 participants