0

from what i could find till now , i am not sure it is possible , but maybe there is something that i am missing.

like in any test project we have lots of tests classes ( in our case these are E2E tests that runs on an live system)

when in some tests we need to run a script as a prerequisite that triggers an iis reset command .

which affect other tests ..

so what we want achieve is running these tests ( tests that triggers iisrest one by one ) after all other tests where executed.

thanks

Amit Barkai
  • 51
  • 1
  • 7
  • Does this answer your question? [NUnit Test Run Order](https://stackoverflow.com/questions/1078658/nunit-test-run-order) – nilsK Nov 26 '20 at 15:32
  • i.e. [Răzvan Flavius Pandas answer](https://stackoverflow.com/a/37054935/2590375) – nilsK Nov 26 '20 at 15:33

1 Answers1

1

You can use the OrderAttribute from NUnit on your tests or you could potentially split the tests into separate TestFixtures so that they do not interfere with each other.

I'm sure others will suggest that all tests should be able to run in any order without affecting any others but my experience is that ordering is sometimes much easier than trying to make each test run completely independently.

Luke Briner
  • 708
  • 4
  • 21
  • an important note i forgot to mention is that test run in parallel via attribute. and regarding to the order attribute i could see this question on the Nunit gitbub project . https://github.com/nunit/nunit/issues/2892 – Amit Barkai Nov 29 '20 at 07:52