Nunit Tests order of Execution

…衆ロ難τιáo~ 提交于 2019-12-10 23:43:47

问题


This might seem a sily question to those who are well versed in autonmation but I am struggling with many things. Here's one:

I am finding that the tests I created with Selenium RC in Visual Studio 2008 are getting run from NUnit in the alphabetical order of their names?

What am I missing? Is there a way to organize the order in which the tests in Nunit are run?

Thanks!


回答1:


Technically, your unit tests should all be able to run independently of each other so ordering should not matter.

I think it might be time to re-think how you are doing your tests.

If you just want them run in a specific order because that's how you "prefer" them to be run, then I would argue that you are throwing away precious time doing something that really isn't that important.

If you need specific things done before the tests are executed, check out the setup and teardown methods.



来源:https://stackoverflow.com/questions/3981469/nunit-tests-order-of-execution

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!