zhangjunpeng9354 / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Display test fixture and name of diasabled tests #452

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When tests are disabled (by prepending 'DISABLED_' to the test name), gtest 
displays a warning at the end of its output, i.e.

    YOU HAVE 2 DISABLED TESTS

It would be useful if this message displayed the test fixture and test name of 
each disabled test such that they can be identified easily, e.g.

    YOU HAVE 2 DISABLED TESTS, listed below:
    [ DISABLED ] TestFixtureA.someTest
    [ DISABLED ] TestFixtureB.someOtherTest

Original issue reported on code.google.com by jdc....@gmail.com on 24 Jan 2014 at 3:48

GoogleCodeExporter commented 9 years ago
A patch has been written for this issue - all that needs to be decided is the 
exact format for displaying the list of disabled tests.
See the discussion on the gtest discussion forum titled "Format for displaying 
disabled test names" for options/opinions.

The current proposed solution would change the current 'summary' of the output 
from gtest from this:

[----------] Global test environment tear-down
[==========] 100 tests from 10 test cases ran. (496 ms total)
[  PASSED  ] 99 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] FailingTestCase.OneFailingTest
[  FAILED  ] FailingTestCase.AnotherFailingTest

 2 FAILED TESTS
  YOU HAVE 2 DISABLED TESTS

To this:
[----------] Global test environment tear-down
[==========] 100 tests from 10 test cases ran. (496 ms total)
[  PASSED  ] 99 tests.
[ DISABLED ] 1 test, listed below:
[ DISABLED ] DisabledTestCase.DISABLED_oneDisabledTest
[ DISABLED ] DisabledTestCase.DISABLED_anotherDisabledTest
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] FailingTestCase.OneFailingTest
[  FAILED  ] FailingTestCase.AnotherFailingTest

 2 FAILED TESTS
  YOU HAVE 2 DISABLED TESTS

(With the '[ DISABLED ]' markers being coloured yellow.)

Original comment by jdc....@gmail.com on 8 Aug 2014 at 8:21