Join GitHub today
Make it easier for scripts to retrieve passed and skipped test results #24
Currently, it is very simple to get a list of failed tests with a single line of code by calling
The changes in this pull request aim to allow passed and skipped test results to be retrieved just as easily as failed ones by changing the way passed and skipped results are handled internally to be more similar to how failed results are handled.
From my POV the change is reasonable, because it follows the "failedTests" pattern.
The only serious concern is related to the impact on the performance and on the memory size. If we have a big test suite (e.g. 10k tests) in the continuous integration flow, we usually expect several tests to fail due to the recent change, so the number of saved test results is minimal. BTW, saving of passed tests in such frequent builds may bloat the RAM memory.
I would propose to make the behavior alterable somehow. E.g. you could keep the original counters for getXXXCount() and record arrays only if such mode is enabled in TestResult and PackageResult constructors.