将多个 mstest trx 文件合并为一个 trx 文件

发布于 2024-08-07 08:30:00 字数 219 浏览 3 评论 0原文

我们使用 Visual Studio 2008 和 MSTest。

我们有一个批处理文件,开发人员用它来获取最新版本、构建解决方案、运行数据库脚本和运行所有测试。

问题是我们有很多测试项目。因此最后开发人员必须打开每个 trx 文件来检查是否有任何失败。

有没有办法将所有测试结果写入单个 trx 文件,或者将结果合并到单个文件?

谢谢

设拉子

We use Visual Studio 2008 and MSTest.

We have a batch file that the developers use to get latest version, build solution, run database scripts and run all tests.

The problem is that we have many test projects. So at the end the developer must open each trx file to check if anything failed.

Is there a way to write all test results to a single trx file, or to merge the results to a single file?

Thanks

Shiraz

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

明媚殇 2024-08-14 08:30:00

mstest /testcontainer:YourTestContainer1.dll /testcontainer:YourTestContainer2.dll ... + 您需要的所有其他 mstest 参数、testrunco​​nfig 等。指向一个 .trx 文件

mstest /testcontainer:YourTestContainer1.dll /testcontainer:YourTestContainer2.dll ... + all the other mstest parameters you need, testrunconfig etc. leeds to one .trx file

锦上情书 2024-08-14 08:30:00

在配置只能处理带有测试结果的单个 trx 文件的构建服务器时,我遇到了同样的问题。一次运行所有测试程序集并不总是一种选择,例如,我需要进行单元测试,部署我的 Web 应用程序,然后在已部署的应用程序上运行一些 UI 测试。

我最终使用 TRX Merger Utility 合并了我的 trx 文件。页面上的一些人的评论表明它对他们不起作用,但对我来说效果很好。

I ran into the same problem when configuring a build server that can only process a single trx file with test results. Running all test assemblies at once is not always an option, e.g. I need to do unit tests, deploy my web app, and then run some UI tests on the deployed application.

I ended up merging my trx files using TRX Merger Utility. Some people's reviews on the page suggest that it didn't work for them, but it works fine for me.

七禾 2024-08-14 08:30:00

我实现这一目标的方法很简单,就是将所有测试项目放在同一个解决方案文件中(不需要是开发人员实际使用的解决方案文件),然后将本地测试运行配置添加到解决方案中,并在我的 mstest 中使用文件命令行指令。

这样我只创建一个 trx 文件。

善良,

The way I achieved this simply was to put all my test projects in the same solution file (need not be a solution file that is actually used by the devs), I then add a local testrun config to the solution and use file in my mstest command line instruction.

That way I only create one trx file.

Kindness,

Dan

春庭雪 2024-08-14 08:30:00
mstest /testcontainer:YourTestContainer1.dll    /testcontainer:YourTestContainer2.dll ...  

数量有限!如果你有一个大项目,请考虑一下。

mstest /testcontainer:YourTestContainer1.dll    /testcontainer:YourTestContainer2.dll ...  

is limited! Think on it, if you have a big project.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文