TFS 测试用例附加文件适用于 ..?

TFS Test Case Attached File is good for ..?

是否有机会使用附加文件(自动测试用例)复制到测试代理并在测试方法中打开它们?还是只是文档附件?

在 TFS 中,为了帮助跟踪工作项(此处为测试用例),我们可以附加一个包含补充信息的文件。

For example, you can attach a screen image that illustrates a problem, a line of code in a text file, a log, an e-mail thread, or a product feature's specification. See Attach files

但一般情况下我们不能也不需要直接在测试代理机上打开附件。

当然可以用API写方法或脚本下载附件,如果机器符合要求,在测试代理机器上打开。

将 REST API 引用到 Download an attachment and Downloading Attachments from TFS

如果你的意思是在单元测试中嵌入文件,你可以参考这篇文章:FILES AS EMBEDDED RESOURCES IN UNIT TESTS