Skip to content

Accessing Code Coverage

Gabriel J. Soto Gonzalez edited this page Oct 15, 2024 · 1 revision

Accessing detailed coverage results in HERON

If checking coverage locally:

  • Run coverage_scripts/check_py_coverage.sh
  • Navigate to tests directory
  • In the coverage_html_report folder, open the index.html file

If checking coverage by running the github action:

  • Find and download the github artifact of the coverage report in either of two ways:
    • From the pull request that generated the run of the github action, go to the PR's "Checks" tab. Click on "Artifacts" immediately below the tabs for the PR, and download "coverage_results" artifactLocationFromPR

    • From anywhere in the HERON github, go to the repository's "Actions" tab and find and open the appropriate run of the github action. Scroll to the bottom of the page and download "coverage_results" under the "Artifacts" heading

artifactLocationFromAction1

artifactLocationFromAction2

  • The downloaded artifact will be zipped. To see the proper formatting when opening the report, first extract all files into a single folder
  • In the new folder, open the index.html file

Note: For the coverage report to behave as intended, the entire contents of the folder created are required, despite the fact that only the index.html file need be opened by the user