如何从 TFS 测试用例读取 xml 附件到测试方法? [英] How to read xml attachment from TFS test case to Test method?

查看:37
本文介绍了如何从 TFS 测试用例读取 xml 附件到测试方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在 TFS 中有测试用例.我想将 xml 文件中的测试参数传递给每个测试用例.为此,我们在 TFS 的每个测试用例中都有一个附件"选项.现在如何将该 xml 文件读入我们的测试方法并使每个测试用例在 MTM(Microsoft 测试管理器)中自动化.这可能吗?

We have test cases in TFS. I would like to pass test parameters in xml file to each test cases.So for that we have an 'attachment' option in each and every test case in TFS. Now how to read that xml file into our test method and make each test case automated in MTM(Microsoft test manager). Is this possible?

推荐答案

遗憾的是,不支持在 MTM 中直接从工作项附件中获取参数值.

Unfortunately, it is not supported to get parameter values from workitem attachments directly in MTM.

可以使用 url 访问 TFS 测试用例中的附件:http://SERVERNAME:8080/tfs/MyCollection/_apis/wit/attachments/e14b962c-b8bc-4e3e-b4f8-398a89c08522.e14b962c-b8bc-4e3e-b4f8-398a89c08522 是附件 GUID.但是当这个下面的时候,它不支持这样做.

The attachment in TFS test case could be reached using an url: http://SERVERNAME:8080/tfs/MyCollection/_apis/wit/attachments/e14b962c-b8bc-4e3e-b4f8-398a89c08522. The e14b962c-b8bc-4e3e-b4f8-398a89c08522 is the attachment GUID. But When this below, it does not support to do so.

[DataSource("Microsoft.VisualStudio.TestTools.DataSource.XML","http://v-tinmo-12r2:8080/tfs/MyCollection/_apis/wit/attachments/{attachmentId},"Row",DataAccessMethod.Sequential)]

这是您可以对您的请求进行投票的用户声音:https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/18643267-get-test-parameter-value-from-test-案例附件

Here is an user voice that you could vote about your request: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/18643267-get-test-parameter-value-from-test-case-attachment

这篇关于如何从 TFS 测试用例读取 xml 附件到测试方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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