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
New DiscoveryMode doesn't play nicely with TestFixtureSource
- Missing GenericFixture
#918
Comments
@afscrome |
I use the NUnit Ordering Library. VS 2022 KO with VS C:>dotnet test C:\Repositories.Net.Net6\Steprunner_Framework\Fixtures\bin\Debug\net6.0-windows\Fixtures.dll --filter "FullyQualifiedName~Ordered.RootOrderedTestFixture" Démarrage de l'exécution de tests, patientez... Exception NUnit.VisualStudio.TestAdapter.NUnitEngine.DiscoveryException, Exception thrown executing tests in C:\Repositories.Net.Net6\Steprunner_Framework\Fixtures\bin\Debug\net6.0-windows\Fixtures.dll => Expected ParameterizedMethod, Theory or GenericMethod, but was TestFixture |
@PatrickLeGarrec Not sure what the NUnit Ordering library is. But, is this the same situation as reported above? If it is different, please upload a small repro :-) |
herited from NUnit Ordering library
Hope that helps This library is so great that we could not imagine to abandon it ;) |
@PatrickLeGarrec Ok. This looks different from the first reporters issue. Can you provide a very small repro of this case? Attach it here or add link to own repo. I believe it should also go into a separate issue, this is not the same as this one. |
yes, in few days.. i need to quickly rebuild a sample, this one is a business case with many dependencies i cannot provide. I m pretty sure it is a similar issue due to discover [OrderedTestGlobalSetUpFixture] and [OrderedTestFixture] |
This issue is about missing Generic Fixture. Yours look like it isn't about that :-) |
TestFixtureSource
TestFixtureSource
- Missing GenericFixture
@afscrome I got the fix in. Your repro works with this change (#918) It would be nice if you can try the enclosed alpha version and verify it works in your scenario. |
@afscrome Version 4.2.0-beta.1 released now on nuget.org https://www.nuget.org/packages/NUnit3TestAdapter/4.2.0-beta.1 . It also contains an engine upgrade, which is the reason for the beta. Would appreciate confirmation that it still works for you. |
@OsirisTerje |
VS 2022 / dotnet sdk 6.0.100
.Net Core 3.1 & 5.0
NUnit 3.13.2
Nunit3TestAdapter 4.1.0
After upgrading
Nunit3TestAdapter
from3.17.0
to4.1.0
, a number of my tests disappeared from the Visual Studio test runner. If I run throughdotnet test
I get aNot a TestFixture, SetUpFixture, ParameterizedFixture or TestSuite, but GenericFixture
exception logged as a warning (see full stack trace below).I've narrowed this down to being caused by
TestFixtureSource
- the error can be reproduced with the code sample below.This seems similar to #869 but I'm still encountering the same exception after upgrading to 4.1. The workaround of changing
DiscoveryMode
toLegacy
in a run settings file does successfully work around this problem.Repro code:
Exception:
The text was updated successfully, but these errors were encountered: