Coverage Thresholds #19
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have added support to configure the threshold that makes a method or class be marked as tested. Currently 100% of method lines need to be tested before its marked as tested, but i have ran into a few situations where its impossible to get that 100% (either bad design or xdebug issues) so the method remains marked as not tested.
With this patch i can specify that if 90% of lines are tasted the method can then be accepted as tested, much like the low and high bounds.
Question:
I was able to add the 2 options to the HTML reports and all the way down to the File.php, however i did not figure out how to call this option from the command line like --html ./_reports --methodCoverageThreshold 90 or something like that, other then registering the option itself, and i thought it should be available as the yui and highlight methods are.
Let me know if this sounds useful or it violates some basic rule of testing, if you think its useful, i'll finish up the unit tests for it. Still running phpunit 3.4 here so i had a few issues running the suite.
Cheers! Pity you are leaving Orlando before i get there on sunday, we could have scheduled a dinner, well next year at tek hopefully.