I expected one output option would be like this:
MyTestCase1: 5 assertions passed
MyTestCase2: 3 assertions passed
...
or even just
MyTestCase1: PASS
MyTestCase2: PASS
....
I figured the log should list the tests that were performed, not just "passed 182 test cases" since that doesn't tell you what tests were in place at the time.
I see the junit and xml reporters to include the test case names. Are there settings that produce a simple list like above? Or is it necessary to transform the xml, or write a reporter? Or is this not a useful output format to ask for for some reason?
I guess this is pretty close ./runner --list-test-names-only || ./runner but still wondering if there is something like I'm saying, with each test case name followed by the result.
If you want your output to contain passed assertions, you can try the -s flag. However, having successful tests be a part of the output leads to an unreadable mess fairly quickly -- I would consider the test suite at my current employer fairly modest, but the summary line is
Passed all 3889 test cases with 28179 assertions.
so having a line per test case would make console output pretty unusable.
If you want your own bespoke output format, then that's what the Reporter interface is for.
Thanks for the response. I think -s is too much information, that's essentially echoing lines of code, where the test names are hand-chosen and presumably human readable.
I see your point about having 4,000 tests, but put yourself in the shoes of a new user with 20 tests: seeing the test names printed seems reasonable to me. From what I see of Google Test docs they print test names in their default output, I didn't install google test, but it looked that way.
I'm not going to press the issue. Just giving the feedback that as a new user I felt 100% sure this type of output must be available in the system, it just seemed logical to me, and spent a long time looking for it. We'll probably just do --list-test-names-only as a way to record what tests were run, I think that's sufficient for our needs so that's good.
+1 to have names of running tests printed as a non-default option.
This can be done now as a side effect of passing -d yes:
root@microzed-zynq7 ~ ./unittests -d yes
0.000 s: Can instantiate Thing
0.000 s: Structs are the right size
===============================================================================
All tests passed (12 assertions in 2 test cases)
Most helpful comment
This can be done now as a side effect of passing
-d yes: