googletest icon indicating copy to clipboard operation
googletest copied to clipboard

can output log only for failed case(s)

Open fchn289 opened this issue 3 years ago • 3 comments

Does the feature exist in the most recent commit?

no

Why do we need this feature?

if there are hundreds/thousands test cases while only 1 failed, it's better the log only contains the failed one - smaller log size, easier to focus on failure info.

Describe the proposal

like this: image

It uses SmartLog to contain log for each case, discarding if case passed, dumping to screen if case failed.

Is the feature specific to an operating system, compiler, or build system version?

no

fchn289 avatar May 31 '22 03:05 fchn289

The way we currently deal with this problem is to have our tools consume the XML output instead of the output log. The UI can be configured to only show the tests that failed.

As convenient as a boolean flag might be, we think the state is more complicated than just a boolean. We would need to think about what the best way to implement this is.

derekmauro avatar Jun 06 '22 19:06 derekmauro

As convenient as a boolean flag might be...

you mean "--gtest_brief" flag? it only controls the log of gtest itself (blue boxes in below picture. It would be better to control the tested code (the testee; red box), too.

image

fchn289 avatar Jun 07 '22 01:06 fchn289

are you interested in this topic?

fchn289 avatar Jul 11 '22 09:07 fchn289