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.
If you have no coveralls_build_data.json for testing available (like me), run smalltalkCI in headful mode and set a breakpoint in SCICoverallsWriter>>#export:in: to explore the result of codeCoverage 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 ...
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! :-)