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

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

    It's very simple. I am using this

    C:>mstest /testcontainer:C:\MyTest.dll /resultsfile:C:\MyTestresults.xml

    The logic is here that by default mstest gives you a .trx file. So in the command against [/resultfile:] option write the name of file by giveing .xml extension. So I used /resultsfile:C:\MyTestresults.xml instead of /resultsfile:C:\MyTestresults.trx

    This works fine for me. Let me know if it works for you.

提交回复
热议问题