如何将 Visual Studio 测试结果文件 (.trx) 格式化为更易读的格式? [英] How do I format Visual Studio Test results file (.trx) into a more readable format?

查看:19
本文介绍了如何将 Visual Studio 测试结果文件 (.trx) 格式化为更易读的格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚开始使用 Visual Studio Professional 的内置单元测试功能,据我所知,它使用 MS Test 来运行测试.

Have just started using Visual Studio Professional's built-in unit testing features, which as I understand, uses MS Test to run the tests.

测试生成的 .trx 文件是 xml,但想知道是否有一种简单的方法可以将此文件转换为更管理器友好"的格式?

The .trx file that the tests produce is xml, but was wondering if there was an easy way to convert this file into a more "manager-friendly" format?

我的最终目标是能够自动化单元测试,并能够生成一个漂亮的文档,显示测试的运行情况以及它们是如何 100% 通过的:)

My ultimate goal is to be able to automate the unit-testing and be able to produce a nice looking document that shows the tests run and how 100% of them passed :)

推荐答案

由于此文件是 XML,因此您可以并且应该使用 xsl 将其转换为另一种格式.IAmUnkown - 博客有一个关于 将 trx 文件解码/转换为 html.

Since this file is XML you could and should use xsl to transform it to another format. The IAmUnkown - blog has an entry about decoding/transforming the trx file into html.

您还可以使用 .NetSpecExporter from Bekk 来创建精美的报告.他们的产品也使用 XSL,因此您可以从下载的文件中窃取它并将其应用到您想要的任何 xsl 应用程序中.

You can also use .NetSpecExporter from Bekk to create nice reports. Their product also uses XSL, so you could probably steal it from the downloaded file and apply it with whatever xsl-application you want.

这篇关于如何将 Visual Studio 测试结果文件 (.trx) 格式化为更易读的格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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