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

NUnit quits while starting with little information #617

Closed
erict-powersoft opened this issue Mar 7, 2019 · 8 comments
Closed

NUnit quits while starting with little information #617

erict-powersoft opened this issue Mar 7, 2019 · 8 comments

Comments

@erict-powersoft
Copy link

VS2017 - 15.9.7
test project has NUnit 3.11.0, NUnit3TestAdapter 3.13.0. All projects build for Any CPU, test settings processor architecture set to x86.

When I select a single test, and run selected test, I get:
[2019-03-07 09:32:09 Informational] ------ Run test started ------
[2019-03-07 09:32:09 Informational] NUnit Adapter 3.13.0.0: Test execution started
[2019-03-07 09:32:10 Informational] Running all tests in C:\Users\eric\OneDrive - PowerSoft\clients\O-RegistrarServer\RestRouteTesting\bin\Debug\RestRouteTesting.dll
[2019-03-07 09:32:10 Informational] NUnit failed to load C:\Users\eric\OneDrive - PowerSoft\clients\O-RegistrarServer\RestRouteTesting\bin\Debug\RestRouteTesting.dll
[2019-03-07 09:32:10 Informational] NUnit Adapter 3.13.0.0: Test execution complete
[2019-03-07 09:32:10 Warning] No test matches the given testcase filter FullyQualifiedName=RestRouteTesting.BasicTesting.Test10_printTicket in C:\Users\eric\OneDrive - PowerSoft\clients\O-RegistrarServer\RestRouteTesting\bin\Debug\RestRouteTesting.dll
[2019-03-07 09:32:10 Informational] ========== Run test finished: 0 run (0:00:01.6208318) ==========

I don't know if the reason for the failed to load is the testcase filter mention. These tests worked on my previous computer, but I had to get a new computer.

When run with nunit3-console, I get an overall result: Passed, but all counts are 0.

Any hints on how to get my tests running again are appreciated.

@OsirisTerje
Copy link
Member

Can you please upload a repro project?
Make it as small as you can, it should compile "as is".

@erict-powersoft
Copy link
Author

NUnitTest.zip
I left the object files in, because your rebuild will probably work (Murphy's law). I tried various things from Stackoverflow and elsewhere, but can't make it work. Thanks for your help

@erict-powersoft
Copy link
Author

Just updated VS 2017 to latest version 15.9.8. No change.

@OsirisTerje
Copy link
Member

OsirisTerje commented Mar 8, 2019

And the repro works on my machine, not surprisingly, because it is the very basic.
image
image
One thing I noted (that should not affect this issue though), is that you include the NUnit.ConsoleRunner. That one is not needed. But it should not cause any issues either, and it works on my machine.

How does it look in the Test Explorer ?

Do you have the vsix adapter installed also ? If you have, please uninstall it.

Also, check if you have an outdated test cache, see this comment #261 (comment) , and delete the whole folder pointed to there.

@erict-powersoft
Copy link
Author

Hi, sorry about the delay. I just removed the vsix adapter - which was also installed. That solved the problem, it now doesn't quit shortly after starting, but finds the test and hits the breakpoint.
Thanks for solving this for me.

@OsirisTerje
Copy link
Member

@erict-powersoft Thanks for confirming that it was the vsix. Strange that it blocked the tests, haven't seen that earlier, but can be versioning, since the vsix takes precedence.

I'll close this :-)

@erict-powersoft
Copy link
Author

Specifically, I could see all the tests, and I could pick one, and try to run it. It would start up, and immediately quit again because it couldn't find the test then.

@OsirisTerje
Copy link
Member

Yes, you see them because the Source Based Discovery (aka Real Time Test Discovery) in Visual Studio finds them, but the adapter is not invoked for that. It is then first when you try to run them the adapter is invoked. Makes me think that Visual Studio should check that it really has a workable adapter up front. Should not cost too much wrt a call.

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

2 participants