googletest icon indicating copy to clipboard operation
googletest copied to clipboard

Add verbose on flag for passing assertions

Open lb0nseu opened this issue 4 years ago • 4 comments

Does the feature exist in the most recent commit?

This feature exist for gmock with flag --gmock_verbose=LEVEL where level of verbosing can be defined. But there nothing like this for gtest.

Why do we need this feature?

In ASPICE standard there is need to provide test report with extended log with full information of values used during tests even if tests passes.

Describe the proposal

--gtest_verbose=LEVEL

info: gTest will print all informational messages, warnings, and errors (most verbose). At this setting, gTest will also log any calls to the ASSERT_/EXPECT_ macros. warning: gGock will print both warnings and errors (less verbose); This is the default. error: gTest will print errors only (least verbose).

Output of this verbose should be also added to xml report.

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

No

lb0nseu avatar Jul 02 '21 06:07 lb0nseu

I think this is a reasonable feature request, but we are unable to prioritize it. We would consider accepting a PR for this feature.

derekmauro avatar Jul 12 '21 19:07 derekmauro

I started working on it. You might want to have a look at: https://github.com/m42e/googletest/tree/output-succeeded Currently it is missing for throw and boolean checks, but works for equals.

Let me know what you think. And feel free to add more things. EDIT: Currently I am struggling with the expected failure thing. But maybe have a look into it later as the googletest-output-test is failing.

m42e avatar Nov 21 '21 05:11 m42e

+1 note: boost test has a log level for long: https://www.boost.org/doc/libs/1_60_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/log_level.html

WilliamTambellini avatar Apr 23 '22 03:04 WilliamTambellini

--gmock_verbose exists now. I think we can close this issue.

NimoTh avatar Dec 03 '25 10:12 NimoTh