Search code examples
c++catch-unit-test

Catch2 - output to console and file


I can run a Catch executable with -o junit --output catch_results.xml to generate an xml report.

Is there some way to both generate an xml report, and also have the console output?


Solution

  • Assuming you are asking for having a JUnit output in a file and the standard console reporter at stdout, there is no way to do that.

    Catch2 used to support multiple reporters, but there was no support for having them write their output to separate files/outputs, which meant that the feature was unusable and was removed until some point in the future.