如何将Google Tests xml结果导入VSTS [英] How to import Google Tests xml results to VSTS
问题描述
我们在基于C ++的解决方案中使用Google Test(gtest)进行测试. 我们在VSTS中构建它以在Windows上运行. 当我们运行test .exe时,它会生成 test_detail.xml 文件,其中包含测试运行的结果:
We use Google Test (gtest) for tests in our C++ based solution. We build it in VSTS to run on Windows. When we run test .exe it produces test_detail.xml file with results of the test run:
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="1152" failures="0" disabled="0" errors="0" time="8.57" name="AllTests">
<testsuite name="testTrim" tests="10" failures="0" disabled="0" errors="0" time="0.041">
<testcase name="trimEmptyString" status="run" time="0" classname="testTrim" />
...
如何将此文件导入VSTS?
How to import this file to VSTS?
如果gtest被识别并显示在构建摘要页面上,那将是理想的选择,即使只是通过\失败,也没有错误的详细信息.
It would be ideal if gtests are recognized and displayed on build Summary page, even if it's just pass\fail, no details of the errors.
推荐答案
结果证明, test_detail.xml 的格式(由gtest生成的报告)为 JUnit ,因此导入到VSTS非常容易,如下所述: https://www.visualstudio .com/en-us/docs/test/continuous-testing/getting-started/continuous-test-java
Turned out that the format of test_detail.xml (report produced by gtest) is JUnit, so it's very easy to import into VSTS, as described here: https://www.visualstudio.com/en-us/docs/test/continuous-testing/getting-started/continuous-test-java
这篇关于如何将Google Tests xml结果导入VSTS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!