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

前端 未结 7 1407
一个人的身影
一个人的身影 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:15

    Problem: What I want to do is to run only the web tests that are included into my ordered test. I'm using an ordered test just for that purpose, so I can run my web tests in the specific order I need them to run in. I have lots of web tests, but my ordered test contains a sub-set of those web tests, which I would like to run. Solution: An ordered test is used to run a set of tests in a certain order. Create an Orderer test list in Visual Studio/test project. From test view window (Test | Windows | Test View), select the OrderedTest and run it from there (you can right-click it and select "Run Selection"). The orderedtest will automatically run all your webtests that are included in it.

    You will the the results in the test results window (Test | Windows | Test Results); double click the OrderedTest, and you will see detailed results for everyone of your webtests there. You can double click each webtest, and you will be able to see detailed results for each of them.

提交回复
热议问题