Skip to content

Conversation

@shadowinlife
Copy link
Contributor

@shadowinlife shadowinlife commented Oct 30, 2025

Purpose of this PR

This pull request adds a new Makefile target to make it easier to generate and view test coverage reports after running unit tests.

Testing and coverage improvements:

  • Added a .PHONY target named coverage to the Makefile, which generates an HTML coverage report (cover.html) from the output of unit tests, making it easier to visualize code coverage.
make help

Usage:
  make <target>

General
  help                            Display this help.
  version                         Print version information.

Development
  manifests                       Generate CustomResourceDefinition, RBAC and WebhookConfiguration manifests.
  generate                        Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
  update-crd                      Update CRD files in the Helm chart.
  verify-codegen                  Install code-generator commands and verify changes
  go-clean                        Clean up caches and output.
  go-fmt                          Run go fmt against code.
  go-vet                          Run go vet against code.
  go-lint                         Run golangci-lint linter.
  go-lint-fix                     Run golangci-lint linter and perform fixes.
  unit-test                       Run unit tests.
  coverage                        Generate HTML coverage report in cover.html.
  e2e-test                        Run the e2e tests against a Kind k8s instance that is spun up.

HTML Results as
image

Change Category

  • Bugfix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that could affect existing functionality)
  • Documentation update

Rationale

Checklist

  • I have conducted a self-review of my own code.
  • I have updated documentation accordingly.
  • I have added tests that prove my changes are effective or that my feature works.
  • Existing unit tests pass locally with my changes.

Additional Notes

@shadowinlife
Copy link
Contributor Author

@ChenYi015 this PR is ready for review. thanks

@shadowinlife shadowinlife force-pushed the unitest/add-coverage-html-command branch from dab6a5c to afa7e4a Compare October 30, 2025 02:40
@shadowinlife shadowinlife force-pushed the unitest/add-coverage-html-command branch from afa7e4a to d716073 Compare October 30, 2025 03:02
@ChenYi015 ChenYi015 changed the title Add make coverage command to view unit test results with HTML format Generate HTML coverage report after running unit tests Oct 30, 2025
Copy link
Member

@ChenYi015 ChenYi015 left a comment

Choose a reason for hiding this comment

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

/approve

@google-oss-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ChenYi015

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 193be82 into kubeflow:master Oct 30, 2025
23 of 31 checks passed
@ChenYi015 ChenYi015 mentioned this pull request Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants