简体   繁体   中英

make Test run last in a Nunit test project

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM