添加HTML以测试结果 [英] Adding HTML to test results

查看:104
本文介绍了添加HTML以测试结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在自动从内部工具向TFS插入测试运行/结果,并遇到了一些问题。我想在某些字段中插入html(例如,在测试结果中的错误消息字段下,我想添加一个HTML结果表)。
但是,在向这些字段添加HTML时,TFS会转义所有HTML并将其显示为纯文本。这可以通过某种方式加以预防吗?或者我可以使用替代方法实现我想要的(插入表格)吗?

I am automating the insertion of test runs/results to TFS from an inhouse tool and have run into some issues. I would like to insert html to some fields (for example, under the error message field in a test result I would like to add an HTML table of results). However, when adding HTML to these fields, TFS is escaping all the HTML and displaying it as plain text. Can this be prevented in some way? Or can I achieve what I want (inserting a table) using an alternative method?

推荐答案

您好TomM92,

Hi TomM92,

感谢您发布此处。

错误消息字段 现在不支持HTML。我尝试使用Rest Api将HTML添加到错误消息字段中,并获得与您相同的结果。但是您可以在此测试结果上创建一个错误,然后您可以使用以下Rest Api来键入
HTML中的STEPS TO REPRODUCE文本框,TFS可以识别文本框中的HTML:

The error message field does not support HTML now. I tried to use the Rest Api to add HTML to the error message filed, and got the same result as you. But you could create a bug on this test result, then you could use the following Rest Api to type the HTML in the STEPS TO REPRODUCE textbox, TFS could recognize the HTML in the textbox:

PATCH https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workitems/299?api-version=1.0

有关详细信息,请参阅以下链接:

For more information, you could refer to the following link:

https://www.visualstudio.com/en-us/docs/integrate/api/wit/work-items#update-work-items

最好的问候

Limitxiao Gao

Limitxiao Gao


这篇关于添加HTML以测试结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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