catchorg / catchorg/Catch2

JUnit reporter testsuite counts are not consistent with number of testcases

Open
#529 7 comments 0 reactions 0 assignees View on GitHub
Possible bug Revisit
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

The test code:

``` c++
TEST_CASE("Single TEST_CASE", "single")
{
CHECK(true);
CHECK(true);
CHECK(false);
}
```

produces the following JUnit reporter output:

``` xml




at /file_path_redacted/bug.cpp:14




```

I'd expect the number of `testcase` elements to match the value of the `tests` attribute on the `testsuite` element. It appears that the attribute is instead counting the number of individual assertions that are made. I believe that is misleading behavior (and unfortunately, I'm not sure the semantics of the JUnit format are terribly clear).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.