I have done this a couple of times before, but it\'s not working today. Am I missing something?
I want to configure Specflow from the scract, using NUnit and to execute
TestFixtureSetUp
and TestFixtureTearDown
attributes were deprecated for quite some time and were finally removed. They are replaced by OneTimeSetUp
and OneTimeTearDown
.
Your choices are probably...
Go back to an NUnit version that supports the old attributes.
Get a version of SpecFlow that uses the new attributes.
Find a way to configure SpecFlow and tell it to use the new attributes. Sorry, but this option, which is no doubt the best, is out of my wheelhouse.
For SpecFlow 3 you have to use the MSBuild generation.
To this, follow these two steps:
From https://specflow.org/2019/generating-code-behind-files-using-msbuild/
Background what is happening:
The VS Extension has sometimes problems to find the used SpecFlow version. In that case, it falls back to the SpecFlow version shipped with the extension (which is really old). This version is generating code with now not existing NUnit attributes.