您可以构建自己的 MSTEST 数据源吗

发布于 2024-08-16 02:10:51 字数 156 浏览 2 评论 0原文

我一直在寻找一种方法来构建自己的数据源,用于 MSTEST 中的数据驱动单元测试。我还没有找到任何文档如何执行此操作或我需要实现的任何基类或接口。有什么想法吗?

我正在考虑构建类似于 FITnesse 的东西,但使用 Team Foundation Server 作为我的后备存储。

I have been looking for a way to build my own DataSource for data driven unit tests in MSTEST. I have not found any documentation how to do this or any base class or interface that I need to implement. Any ideas?

I'm looking at building something similar to FITNesse but using Team Foundation Server for my backing store.

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

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

发布评论

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

评论(2

罪歌 2024-08-23 02:10:51

这是我从 Microsoft 的 Mathew Aniyan 那里得到的回复

不幸的是,数据源机制不可扩展。
我将添加一个功能请求以使其可扩展。这不会出现在 VS 2010 中。

This is the response i got from Mathew Aniyan at Microsoft

Unfortunately the data source mechanism is not extensible.
I will add a feature request to make this extensible. This will not make it into VS 2010.

怎樣才叫好 2024-08-23 02:10:51

目前,使用 MsTest v2,数据驱动测试方法的自定义数据源非常容易处理。
请参阅https://stackoverflow.com/a/66312973/8194898
的答案
另外,可以尝试使用有效的演示代码
https://github.com/matei-tm/howto-demos/树/主/MstestCustomDataSource

Currently, with MsTest v2, a custom data source for a data driven test method is something that is very easy to handle.
See the answer for https://stackoverflow.com/a/66312973/8194898
As well, a working demo code can be tried from
https://github.com/matei-tm/howto-demos/tree/main/MstestCustomDataSource

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