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
Difference between net5.0/net6.0 and netframework 4.7.2 in test tear down #4688
Comments
@StarWars999123 I presume you are NUnit version 3.xx? Version 4.xx does not support .net core 5.0, only 6.0. Do you use any (Default)TimeOut as that behaviour is different, although I don't see that in your stack trace. |
@StarWars999123 Can you share a minimal repro? It should be as small as possible while still able to run "as-is" to make it easier for the team to investigate. |
Yes, I am using Nunit 3.13.3 still. Debugging showed a different time of initialization of those classes. I use it together with Specflow (3.9.74), but due to the initialization I would assume its still an Nunit topic. I can try to setup an example project, but this may take some time. |
Thanks @StarWars999123 A repro will help us understand a few things including how you're managing configuration, what runner you may be using (ex: console or the adapter + testhost, etc). |
Ok, did that. See: nunit/nunit.issues#5 |
Hi,
I noticed a difference during the tear down of netframework (4.7.2) and netcore (net5.0 (Update: appared as well with net6.0)) test projects:
My previously set variables are not longer accessible and the classes (e.g. a System.Configuration.ConfigurationElement with some temporary variables) get reinitialized. Theirby I loose right now some important information, that persists in netframework projects.
I use specflow.Nunit on top, but I assume, that this is a behaviour difference cause by NUnit.
The accessing TearDown method is the following Specflow hook:
and during debugging, it gets called with the following stack trace.
I couldn't find any documentation so far about differences between netframework and netcore, but my tests, showed, that there is a difference in the behaviour. How should this be fixed?
Thank you in advance :)
The text was updated successfully, but these errors were encountered: