单元测试中TestMethods的顺序 [英] Order of TestMethods in a unit test

查看:73
本文介绍了单元测试中TestMethods的顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在visual sutio 2010中创建了C#单元测试.
单元测试有一些测试方法无法按我想要的顺序运行.
如何更改方法的执行顺序?

Hi,
I created a C# unit test in visual sutio 2010.
The unit test has a few test methods that don''t run in the order I want.
How can I change the order of the execution of the methods?
Thanks in advance!

推荐答案

很简单,使用有序测试
请参考如何:创建有序测试 [ ^ ]
Its simple, use Ordered Test
Refer How to: Create an Ordered Test[^]


这篇关于单元测试中TestMethods的顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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