-
Notifications
You must be signed in to change notification settings - Fork 326
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
No tests discovered #780
Comments
This looks likely to be a bug in xUnit.net, not VSTest. There is a dictionary in our VS adapter which maps unique IDs to test cases that is probably being tripped up here. The question will be to figure out how you ended up with two test cases with the same unique ID, |
@bradwilson I see that from the output of the runner against the |
Until I can poke around inside and see what's going on, I don't know. It could be that VSTest is handling the two scenarios differently (hiding the bug in one, exposing it in the other, but not running any tests in either case). |
@aggieben Please use latest version of package With new package you will see that error message which adapter is sending is coming to console. with latest version you will get following output:
|
Only run all scenario ( From both commandline and visual studio) is busted here. |
I am running into this exact issue except I am using the latest versions of everything. Is this still an outstanding issue with |
@MarkHerhold Issue was determined as xunit adapter's. Can you share repro project, logs(https://github.com/Microsoft/vstest-docs/blob/master/docs/diagnose.md) and explicitly provide the versions of (dotnet --info, VS, xunit and Microsoft.NET.Test.Sdk)? |
@smadala The strange thing is that the tests work just fine when run from VS Community Edition. Luckily, the project is open source and brand new, so that should make things simple.
|
@MarkHerhold I couldn't repro it. See the below image. Share all log.*.txt files. |
@smadala I see one thing you did differently is you Edit: Thanks for your help trying this! I'll collect the other log later today. |
Running tests for |
@smadala Ah, that's the issue! Thanks so much for your help! 😀 |
Description
I converted a project to the new .csproj format recently as a part of an effort to port to .NET Core, and after I did that and got everything building, the vstest runner stopped being able to find tests in the project. The strangest thing to me is that I can run individual tests in VS2017, but when I try to run with "Run all tests", the runner fails to find any.
The Xunit runner does work, however. When I run
dotnet xunit
, it finds all the tests and I get the expected behavior.Steps to reproduce
I'm not entirely sure what I did to get in this state, but the project is accessible here:
https://github.com/aggieben/dbup/tree/release/4.0.0
Access is open. Please
git clone https://github.com/aggieben/dbup; cd dbup; git checkout release/4.0.0
to get the project(s) in question.Expected behavior
VS2017 test runner should show discovered tests in test explorer, and when "run all tests" is selected, it should run the tests. Similarly,
dotnet test
should execute all the tests for both targets (netcoreapp1.0
andnet46
).As mentioned above, the Xunit runner does produce the expected results.
Actual behavior
When running with
dotnet test
, this is the output:Environment
Test runner-related packages from the
.csproj
:The text was updated successfully, but these errors were encountered: