controling the order of tests execution with NUnit

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!
 
J

Julie

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top