catchorg / Catch2

A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)
https://discord.gg/4CWS9zD
Boost Software License 1.0
18.51k stars 3.04k forks source link

JUnit and console reporter discrepency. #2856

Open TrueWodzu opened 5 months ago

TrueWodzu commented 5 months ago

Hi guys,

I don’t know if this is a bug or not, but I just discovered that there is a discrepancy between how JUnit and console reporters report run test cases.

If I will create a test case that does not have any assertions in it, the test will not be reported by JUnit even though it was run.

For example:

TEST_CASE("SomeTest")
{
    // Do something here
    //CHECK(true);
}

This test won't be seen in JUnit file but the console reporter will report it. Shouldn't it be visible in JUnit report as well?