Ivan
Ivan

Reputation: 9695

How to import Google Tests xml results to VSTS

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" />
...

How to import this file to VSTS?

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.

Upvotes: 0

Views: 930

Answers (1)

Ivan
Ivan

Reputation: 9695

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

Upvotes: 1

Related Questions