Mbunit and selenium

Go To StackoverFlow.com


Can anyone tell me how get mbunit to run more than one test at a time without it setting up and tearing down after every test?

Currently I'm using selenium for UI testing and need to run the tests consecutively do a login page.

Thanks in advance, cb

2009-06-16 13:41
by ctb


Are you looking for FixtureSetUp/FixtureTearDown attribute [used to be called TestFixtureSetUp], which is called at class level, meaning, it will be set up once for all the tests in one test class.

Setup/TearDown attribute is called on Method level.

MbUnit also support test assembly setup and teardown. Here is a link for this.

[assembly: AssemblyCleanUp(typeof(AssemblyCleaner))]
public class AssemblyCleaner
    public static void SetUp()
        Console.WriteLine("Setting up {0}", typeof(AssemblyCleanUp).Assembly.FullName);
    public static void TearDown()
        Console.WriteLine("Cleaning up {0}", typeof(AssemblyCleanUp).Assembly.FullName);
2009-06-16 13:50
by J.W.
Thanks J.W, answered a few other questions I had as well : - ctb 2009-06-18 09:41