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.
This PR fixes the selection and reporting of targets for coverage testing. Concretely, two relevant changes are made:
Fix file paths for coverage reports
Implement and test proper handling of class-side methods, extension methods, trait methods, and special message selectors.
Honor extension methods of selected packages for coverage testing
Additionally, I updated the documentation on coverage configuration.
Resolves #362.
Disclaimers
I did not yet fix the selection of coverage targets for traits (as noted in the updated documentation). This is currently also broken in Squeak's own TestRunner (and likely in the SUnit implementation of other dialects at all). I have created a second PR (#572) for this but would prefer to merge this separately as it depends on a not-yet-merged change to the Traits package.
To try out
You can use this example repository: SCICodeCoverageExample.zip
If you have no
coveralls_build_data.json
for testing available (like me), run smalltalkCI in headful mode and set a breakpoint inSCICoverallsWriter>>#export:in:
to explore the result ofcodeCoverage coverallsSourceFilesIn: projectDirectory
.Note that the example methods from the trait currently are marked as uncovered, which is a consequence of the limitation I mentioned above. Also, the two
nil
entries in the list are caused by this limitation. I'm working on it ...Looking forward to your review! :-)