When I run my catch unit tests with -r junit
, successful test cases are omitted from the output. This causes my Jenkins build to fail because the JUnit plugin is expecting testcase tags in the JUnit XML. Is there anyway to have testcase tags appear in my JUnit output if they run successfully?
Catch Test
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
TEST_CASE("Pass")
{
SECTION( "Passing on purpose" ) {
REQUIRE(true);
}
}
TEST_CASE("Fail")
{
SECTION( "Failing on purpose" ) {
REQUIRE(false);
}
}
Output from -r junit
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="WhispererEngineTests.exe" errors="0" failures="1" tests="2" hostname="tbd" time="0.154008" timestamp="2017-11-02T14:53:57Z">
<testcase classname="Fail" name="Failing on purpose" time="0.153527">
<failure message="false" type="REQUIRE"> at -user path- test_Card.cpp:20
</failure>
</testcase>
<system-out/>
<system-err/>
</testsuite>
</testsuites>