I am trying to run Telerik Framework Test using NUnit (through visual studio). And I need to initialize some variables before the tests run. I am using [TestFixtureSetUp] and [TestFixtureTearDown] for this. But it seems that these are being executed for each and every [Test] Method ([TestFixtureSetUp] and [TestFixtureTearDown] should be only once!)
[TestFixtureSetUp]
public void MyTestInitialize()
{
SetUpAndTearDown setup = new SetUpAndTearDown();
myDriver = setup.SetupTestEnvironment("ie");
}
[Test]
public void Grid()
{
//code for gird
}
[Test]
public void Box()
{
//code for Box
}
[TestFixtureTearDown]
public void CleanUp()
{
SetUpAndTearDown teardown = new SetUpAndTearDown();
teardown.TearDownTestEnvironment(myDriver);
}
I am using NUnit - 2.6.2 Visul studio 2010 ultimate