How Does MSTEST/Visual Studio 2008 Team Test Decide Test Method Execution Order?

前端 未结 7 1292
一个人的身影
一个人的身影 2020-12-03 21:47

I was under the impression that the test methods in a unit test class would be executed in the order that they appear in the class file. Apparently this is not true. It also

相关标签:
7条回答
  • 2020-12-03 22:21

    Sorting in Test View, or test list editor causes them to appear like you have control -- it's just a by product of the implementation. We make no attempt to actually execute them in a specific order (We've gone back and forth on the "allow order", and "randomly order").

    If you really need order, that is what ordered tests are for. These are available in all editions where Unit Test is available -- either use the Test/New Test menu, or right click the test project and create a "ordered test"

    0 讨论(0)
提交回复
热议问题