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

Public API for accessing TestFilter while listing test #2502

Open
iskiselev opened this issue Jul 31, 2020 · 1 comment
Open

Public API for accessing TestFilter while listing test #2502

iskiselev opened this issue Jul 31, 2020 · 1 comment
Labels

Comments

@iskiselev
Copy link

There is no public API to access test filter during test discovery for test adapters. There is issue nunit/nunit3-vs-adapter#438 that NUnit ignores TestCaseFilter while ListTests specified. But looks like there is no API in vstest to make this scenario working correct.
ITestDiscoverer.DiscoverTests accept IDiscoveryContext. It is implemented with Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Discovery.Implementation, that contains GetTestCaseFilter function - but it is not accessible though interface.

@nohwnd
Copy link
Member

nohwnd commented Jun 22, 2021

I implemented this in XUnit, or at least a similar feature. Please review this code if it helps: https://github.com/xunit/visualstudio.xunit/pull/205/files

@nohwnd nohwnd added the triaged label Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants