← Back to team overview

nunit-core team mailing list archive

[Bug 1159688] Re: NUnit TestFixtureSetUp runs multiple times?

 

I haven't tried to console runners yet. In my test, I use NUnit GUI. So,
Are there any ways to resolve my problem? To make clear my problem...May
i send you all my project..it's just a small example ....Can i get your
email and send you .rar file? Or...you don't need because you understood
me?

Sincerely!

-- 
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/1159688

Title:
  NUnit TestFixtureSetUp runs multiple times?

Status in NUnit V2 Test Framework:
  New

Bug description:
  
  Hi, i meet this problem, too , but i can't research any solution..Please show me how to fix it or i must install new verion?...

  http://stackoverflow.com/questions/11316623/nunit-testfixturesetup-
  runs-multiple-times

  I have a basic Test setup using NUnit 2.6 and Visual NUnit in Visual
  Studio 2010. My problem is that when I'm running all tests it seems
  like the FixtureSetup method (which has the TestFixtureSetUpAttribute)
  is running one time for each of the tests.

  I've also tried to put the Init code to the constructor, but it gives
  the same results.

  The tests themselves reports their run time to runtime like 0.003 and
  0.032 and so on.

      [TestFixture]
      public class MODatabaseTests
      {
          [TestFixtureSetUp]
          public static void FixtureSetup()
          {
             // Perform heavy init (~1.5s)
          }

          [Test]
          public void TestA()
          {
              ...
          }

          [Test]
          public void TestB()
          {
              ...
          }

      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/1159688/+subscriptions


Follow ups