-
Notifications
You must be signed in to change notification settings - Fork 812
dotnet test filter or query filter not working #3270
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
Comments
That's a consequence of you enabling MTP for You have to use the new switches, and pass them after The VSTest team is working on improving the
Note that all these command line switches must be placed after the
I can verify that an assembly negation query does work as expected for me: Note that the assembly is "run" but none of the tests are run (because they've all been filtered out). However, MTP Instead, you can pass the additional command line switch |
@bradwilson Depending on how acceptable for you to take breaking changes, I think you can plug an MSBuild target that produces an error when TestingPlatformDotnetTestSupport is set to true and VSTest-specific command-line switches are used. Most of the VSTest-specific command-line switches are transformed to MSBuild properties, so it's easy to do that in a target. Some properties:
|
@Youssef1313 Why doesn't Microsoft.Testing.Platform.MSBuild do this? |
Hmm, ok. Well that's rather unwieldy, but it seems to work. Maybe add it to the filter-query documentation? Than going to my secundary question: Is there a way to get the verbose logging back? i.e. listing all the tests that are run? |
We can do that. But there are backcompat concerns. @JochemPalmsens Try |
@JochemPalmsens Good point. Done. |
Uh oh!
There was an error while loading. Please reload this page.
We want to upgrade to xUnit v3 (as it's much faster we've noticed). All seems to go well locally, but on our build server we don't want to run all the tests.
The old action command-line is
When switching to xUnit v3, both the
-filter
and-logger
commands seems to be ignored! It tries to run all the test( assemblie)s and the logging is not verbose, but just one line per test project.I've tried fixing the filtering using the new xunit v3 query filter.
But that filter also doesn't seem to work: it's still running all the test asseblies.
Is there a known issue with using
dotnet test
with xUnit v3 or am I doing it wrong?I've tried to simplify it down
which should only run the
Contoso.Product.Api.Tests
assembly... However it still runs all the test assemblies.I'm using Visual studio 17.13.6
All projects have the following properties set
So something doesn't seem to be working correctly. I've tried looking if I missed some step, but it's hard to find good information.
(and secondly it would also be nice to get the verbose logging back)
The text was updated successfully, but these errors were encountered: