-
Notifications
You must be signed in to change notification settings - Fork 106
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
When group of tests contains sub-group, VS 2019 Test Explorer shows Not Run, while all tests pass separately #775
Comments
@wlf84k Are you able to produce a repro for this? Screenshots? Logs? |
I've been playing with a debugable version of test adapter and I've found that this is related to TestCaseSource attribute and it is probably also a test discovery related issue. I managed to create a simple repro:
[Edit] Version 4.0.0 from GitHub master branch also produces the same issues I have also a general remark for test execution: when there is an issue with execution/discovery process or test assembly could not be loaded for some reason, Test Explorer never produces any info about it. It just stops execution and says "Not Run". Is it planned to support more info in Test Explorer? |
@wlf84k Thanks !
I agree it would be great with more info in the Test Explorer. That is outside our scope [as an adapter] though. I'll see if we can get some more output in our own logs though. |
@OsirisTerje Thanks for the info! In the meanwhile I found a less clean workaround for this which doesn't require turning off real time discovery. For the code:
The workaround would be to change this:
So that SetName() is not called and ToString() from data class is used instead. Maybe someone wil find this useful but I think your proposal to just turn off real-time discovery is much easier and cleaner. |
Thanks! Interesting approach :-) It can be useful as a check later. These things should behave equally, so when we get to have the RTD fixed, this should be one of the checks. |
We just hit this as well in VS2019 and |
I was about to raise a separate issue but then looked more closely at this - my issue is the same but it runs all tests in the assemby not none and turning off live discovery fixes it. I was about to submit this:
In the below test explorer if I right click any of the levels in the hierarchy and run tests then it runs all tests in the assembly not the ones under that group. If I individually select the actual tests as shown then it runs the correct tests. If I then include any one of the 3 test function names which have test cases provided via TestCaseSource attribute then it runs all the tests in the assembly again. |
@sliddington You can a) Add it as a PR to https://github.com/nunit/nunit3-vs-adapter.issues, add it as a separate folder named IssueXXX where the XXX is the issue number, or b) Add it as a zipped attachment here , or c) Add it to your own repo and just post the link. Make it as small as you can, it should compile "as is". |
Hi @OsirisTerje. |
Setup:
Issue:
Test project contains 3000+ tests, in Test Explorer they are categorized and grouped so that the tree of categories/tests has multiple levels. All tests are discovered correctly. All tests can be run separately and they pass. It is also possible to run a group of tests but only if it doesn't contain a sub-group.
If group of groups of tests is run then nothing is executed and each test is marked as Not Run with a blueish exclamation mark icon. No additional information or error is provided
Some groups always work and some always not work (within the same test assembly/project)
This worked fine with VS 2017 15.9.23 and NUnit 3 Test Adapter 3.9.0
The text was updated successfully, but these errors were encountered: