您可以构建自己的 MSTEST 数据源吗
我一直在寻找一种方法来构建自己的数据源,用于 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我从 Microsoft 的 Mathew Aniyan 那里得到的回复
This is the response i got from Mathew Aniyan at Microsoft
目前,使用 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