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

Improved unit-test coverage of dicom packages by up to 93.3% using Keploy AI-agent #345

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nehagup
Copy link

@nehagup nehagup commented Feb 11, 2025

What does this PR do?

Hey, I’ve added new unit tests to the Go files while testing the capabilities of my Keploy AI testing agent. The tests ensure reliable coverage by validating code builds, eliminating flaky tests, and improving overall test stability. Here’s what the AI checks for:

  • Ensures new tests build without errors.
  • Confirms no flaky tests are introduced.
  • Enhances coverage for previously untested areas.

Motivation

I was testing the Keploy agent for Go repositories and decided to try it on dicom! After identifying coverage gaps, I focused on improving test coverage in key packages using AI-generated tests.

Describe how you validated your changes

The coverage was checked before and after the changes, confirming a significant increase:

Coverage Breakdown:

Package Coverage Before Coverage After
pkg/dicomio 0.0% 70.5%
pkg/charset 0.0% 94.4%
pkg/uid 0.0% 93.3%
pkg/dcmtime 87.4% 92.1%
pkg/tag 29.4% 44.1%
pkg/frame 42.6% 82.0%

Possible Drawbacks / Trade-offs

Relying on AI-generated tests for critical code might need additional validation by the team.

Additional Notes

Would love your feedback on this—does it look good to merge, or are there any changes you'd suggest?

Signed-off-by: Neha Gupta <[email protected]>
@suyashkumar
Copy link
Owner

Thanks for this! Will take a look and go through which tests make sense. I think it's a good idea to leverage AI tools to improve test coverage.

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.

2 participants