controling the order of tests execution with NUnit

  • Thread starter Thread starter Udi
  • Start date Start date
U

Udi

Hi,
I'm new to NUnit and C#.
I've created a list of tests for my module and everything works fine.
However, there are several tests that depend on other, and must be run
after them. is it possile to control the order of the tests execution
through NUnit?
Thanks!
 
Udi said:
Hi,
I'm new to NUnit and C#.
I've created a list of tests for my module and everything works fine.
However, there are several tests that depend on other, and must be run
after them. is it possile to control the order of the tests execution
through NUnit?
Thanks!

You should not have dependencies between tests, you need to rearchitect your
methods/classes.

Dependencies should either be handled by putting necessary
startup/initialization in a [SetUp] method, or to have your [Test] methods
explicitly call other initialization routines.
 
Back
Top