Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix targets for coverage testing #571

Closed
wants to merge 4 commits into from

Conversation

LinqLover
Copy link
Collaborator

@LinqLover LinqLover commented Sep 29, 2022

This PR fixes the selection and reporting of targets for coverage testing. Concretely, two relevant changes are made:

  1. Fix file paths for coverage reports

    Implement and test proper handling of class-side methods, extension methods, trait methods, and special message selectors.

  2. 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 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 ...


Looking forward to your review! :-)

LinqLover and others added 3 commits September 29, 2022 19:19
Implement and test proper handling of class-side methods, extension methods, trait methods, and special message selectors.
Lol, I had installed an extension that would automatically try to regenerate the TOC upon every save (markdown.extension.toc.updateOnSave) ...
@fniephaus fniephaus self-assigned this Oct 9, 2022
Copy link
Member

@fniephaus fniephaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot for improving code coverage! :)

@fniephaus
Copy link
Member

Integrated as part of #575.

@fniephaus fniephaus closed this Oct 9, 2022
@LinqLover LinqLover deleted the fix-coverage-targets branch October 9, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coveralls testing is skipping class side & extension methods
2 participants