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

test(openchallenges): exclude Java classes generated by OA Generator from coverage report #2332

Merged

Conversation

tschaffter
Copy link
Member

@tschaffter tschaffter commented Nov 7, 2023

Closes #2331

Description

Exclude .java classes that originate from auto generated code by OpenAPI Generator. The approach taken is to exclude known files that are auto generated. In order to achieve this, I had to move the files *ApiDelegateImpl.java into their own packages.

This approach is implemented for the image service. It will be implemented for other services in future PRs.

Notes

  • Force the tests to run instead of using cache with ./gradlew test --rerun-tasks.
  • The exclude property expects the name of .class files, not .java files.
  • JaCoco synthax:
    * matches zero or more characters
    ** matches zero or more directories
    ? matches a single character
    

Preview

Before excluding any classes:

image

After excluding classes generated by the OpenAPI Generator:

image

@tschaffter tschaffter self-assigned this Nov 7, 2023
@tschaffter tschaffter marked this pull request as ready for review November 7, 2023 22:24
@tschaffter tschaffter merged commit cf52ea0 into Sage-Bionetworks:main Nov 7, 2023
8 checks passed
@tschaffter tschaffter deleted the exclude-java-files-from-test branch November 7, 2023 22:24
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.

[Task] Exclude Java classes generated by OA Generator from coverage report
1 participant