From my experience, when a test gets temporarily disabled it all too often gets forgotten about and remains disabled almost indefinitely - the prompt of how many tests are disabled isn't enough to spur on the effort to `grep "DISABLED"` to find the disabled tests and consider why they are disabled and either fix or remove them - having the disabled test names appear in the output should just be enough to at least keep those tests in mind; hence issue 452.
The patch itself is pretty simple, what I can't decide is the best format of output. Assuming everyone agrees that the disabled tests shouldn't appear in the main body of the output where each test is run, rather they should only appear as a list at the end of the output in the summary, the question is how/where should the list of disabled tests appear?
For sake of clarity, the current summary at the end output, with some failing tests, disabled tests and passing tests, is formatted as (colour omitted):
[----------] 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
In my opinion, there are two options. Firstly, the list of disabled tests could remain completely separate from the rest of the list of tests, appearing below the line which warns of the disabled tests (using the same format as for passed/failed tests), i.e.
[----------] 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, listed below:
[ DISABLED ] DisabledTestCase.DISABLED_oneDisabledTest
[ DISABLED ] DisabledTestCase.DISABLED_anotherDisabledTest
Personally, this is my least preferred of the two suggested options. I think it distracts the users eye from the most important part of the report - the failing tests - forcing him/her to 'pick out' the lines containing the failing test namess as opposed to being naturally drawn to them at the bottom of the output.
The second option would be to place the names of the disabled tests in amongst the passed/failed list at the bottom of the report, i.e.
[----------] 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
In a similar vain to my comments on the previous options, I feel the list of disabled tests should go in between the number of passed tests and list of failing tests as it means the users eye is still naturally drawn to the list of failing tests at the bottom of the list and any users interested in disabled tests can 'pick out' their names from within the list. Furthermore, if there are no failing tests but there are disabled tests, the user will naturally be drawn to the list of the disabled tests at the bottom of the list forcing them to at least consider the disabled tests a bit more than they do currently.
Side note: One could also argue that the number of failing tests should go at the very bottom of the output, and maybe the phrase "you have 2 disabled tests" should be changed to "2 disabled tests" for consistency, something like:
2 DISABLED TESTS
2 FAILED TESTS
Although I don't want to rock the boat too much...
All thoughts, comments and suggestions welcome.