mardi 2 février 2016

NUnit Testing: Failing to properly instantiate the test suite due to SetUp attributes

Good morning,

As context, I am working in an automated test suite using nUnit 3.0.1 (with Selenium). The tests are being runned directly from Visual Studio 2013' Test Explorer.

My problem is this: There is some Setting up functionality that I am trying to make automatic when starting to run the test suite. These are things that need to be done only ONCE for all the suite of tests, so using the [SetUp] Attribute for each test class is not what I intend.

When I run the Tests however, my setting up is not even touched :(. Debugging confirms that the setting up is not being done.

So far I have tried using: [SetUpFixture] along with [OneTimeSetUp] or [SetUp] (in many combinations), also tried removing the namespace. I am still not getting what I need.

I am fairly new with nUnit, so I would like some guidance about what could be wrong, or some alternatives to making sure the scripted setup is run.

Aucun commentaire:

Enregistrer un commentaire