MSTEST/Visual Studio 2008团队测试如何确定测试方法的执行顺序? [英] How Does MSTEST/Visual Studio 2008 Team Test Decide Test Method Execution Order?

查看:218
本文介绍了MSTEST/Visual Studio 2008团队测试如何确定测试方法的执行顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的印象是,单元测试类中的测试方法将按顺序执行它们出现在类文件中.显然,这是不正确的.它也似乎也不是完全基于字母顺序. MSTEST如何确定执行顺序?

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 doesn't appear to be purely based off of alphabetical order either. How does MSTEST decide execution order?

经过一点挖掘,我能够找到答案.见下文.

I was able to track down the answer after digging a bit. See below.

推荐答案

我能够找到答案.

根据Microsoft员工Guillermo Serrato :

MSTest执行所有测试 同步地,顺序是 不确定的

MSTest executes all tests synchronously, the order is nondeterministic

这篇关于MSTEST/Visual Studio 2008团队测试如何确定测试方法的执行顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆