如何从单元测试结果生成html报告 [英] how to generate html reports from unit test results

查看:91
本文介绍了如何从单元测试结果生成html报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
我想从trx结果中获取HTML报告..
我拿了一个xslt文件并进行了硬编码.
..

然后在xml标签下面的.trx文件中添加该xslt文件...

当我拖放该.trx文件时,它就像:
VSTS测试结果

-------------------------------------------------- ------------------------------

摘要:
测试执行失败时间


-------------------------------------------------- ------------------------------
测试名称描述结果


但没有输出..
如果有人知道请让我知道..

预先感谢..

hi to all.
i want html report from trx results..
i take one xslt file and do hard coding.
..

and i add that xslt file in .trx file below xml tag...

when i drag and drop that .trx file it comes like :
VSTS Test results

--------------------------------------------------------------------------------

Summary:
Tests Executed Failed Time(s)


--------------------------------------------------------------------------------
Test Name Description Result


but not getting outputs..
if any body knows pls let me know..

thanks in advance..

推荐答案

您可以参阅CodeProject文章 HTML报告引擎 [^ ]由Ambal.

它将为您的查询提供更好的解决方案.
You can refer CodeProject article The HTML Report Engine[^] by Ambal.

Itz the better solution for your query.


每次测试运行都会创建一个TRX文件.可以在VS中查看此文件.如果要在浏览器中以交互方式显示它,则需要编写代码来解析此文件并将其转换为相关的HTML.
Each test run creates a TRX file. This file can be viewed in VS. If you want to show it in an interactive way within the browser, you will need to write code to parse this file and convert into to relevant HTML.


您好,请检查此链接将.trx文件转换为漂亮的HTML文件格式的工具

http://trxviewer.codeplex.com/documentation
Hi Mate, check this link there is a tool to convert the .trx file to a nice HTML file format

http://trxviewer.codeplex.com/documentation


这篇关于如何从单元测试结果生成html报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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