Feature Request: Match GTest JUnit XML Format
- Dominant language
- C++
- Stars
- 21.5k
- Forks
- 3.5k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 2
Description
## Description
I am working on a Qt + ROS 2 project and I will be using Catch as my unit testing framework. The ROS 2 build system, Ament, supports any test framework which exports JUnit XML files that follow the GTest standards described here: https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md.
Currently, Ament can only see the difference between pass/fail, which is good enough; but it would be great to have the ```ament test_results``` command work to see what specific tests failed, and how they failed. Currently, that command does not work because the Catch JUnit XML does not contain all of the tags that the GTest XML adds.
### Extra information
Currently, the ```ament test_results``` command fails with the message
```
Skipping 'build\[path\to\output\folder]\[file].catchtest.xml': KeyError: 'tests'
```
Presumably, this is the Python KeyError exception, being thrown because the root node of the file does not contain the attribute 'tests'.
As stated above, this is not a mission-critical kind of thing; I'm happy to just look through the XML reports, but it would be super convenient if Catch could be used in places that expect GTest format.
* Catch version: **v2.2.1**
* Operating System: **Windows 10**
* Compiler+version: **Microsoft Visual Studio Compiler 2015**
Contributor guide
Research direction
Compare Catch's JUnit XML output with the GTest format described in the linked Advanced Guide, starting with the missing root `tests` attribute reported by `ament test_results`. Trace where Catch generates its JUnit XML and verify the result against the Ament command; done means Ament reports individual failures and their details without the KeyError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100