从 MbUnit 迁移到 MsTest 时的问题

发布于 2024-07-07 05:51:16 字数 157 浏览 6 评论 0原文

我们的团队正在寻求从使用 mbunit 切换到使用 mstest,但两者之间似乎存在一些脱节。

有谁知道如何在使用 mstest 时模拟 mbunit 的 CombinatorialTest 和 Factory 属性?

我认为这是我们进行转换之前唯一的绊脚石。

Our team is looking to switch from using mbunit to mstest, but there appears to be some disconnect between the two.

Does anyone know how to simulate the CombinatorialTest and Factory attributes from mbunit when using mstest?

I think that is our only stumbling block before doing the switch.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

_畞蕅 2024-07-14 05:51:16

据我所知,您基本上需要编写一个测试方法来生成所有组合(或调用工厂并迭代项目),并多次调用原始测试(现在不再是测试方法) 。

不幸的是,这些不会在结果中显示为单独的测试 - 它们仅显示为一项测试 - 因此您必须在错误输出中非常明确。 这意味着,与这种方法一样,一旦一个失败,它就会停止其​​余的(您可以通过保留一个大的结果列表来解决这个问题,但这会带来更多的开销)

我现在在进行 mstest 之前会三思而后行,除非您必须 - 在干净的机器上缺乏测试运行程序是致命的,而且它既不可扩展也不经常更新。

As far as I'm aware, you basically need to write a test method that generates all of the combinations (or calls the factory and iterates through the items) that calls your original test (now no longer a test method) a bunch of times.

Unfortunately, these do not show up as individual tests in results - they show up as just one test- so you have to pretty explicit in your error output. This means that as with this approach, as soon as one fails it stops the rest (you can get around this by keeping a big list of results, but that's yet more overhead)

I'd think twice before going to mstest right now unless you have to - the lack of a test runner on a clean machine is killer, and it's neither extensible nor frequently updated.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文